aboutsummaryrefslogtreecommitdiff
path: root/ports/status-code
diff options
context:
space:
mode:
authorNiall Douglas <s_github@nedprod.com>2021-03-30 18:17:02 +0100
committerGitHub <noreply@github.com>2021-03-30 10:17:02 -0700
commita434cc74ea515e6612bcb66d8f4ab69bbb8c62bf (patch)
treef407f5a9d737aade2b1a4fd95fe4ea0c986a77c3 /ports/status-code
parent105456798402aa5f494ffeb3b19dd0d870656d39 (diff)
downloadvcpkg-a434cc74ea515e6612bcb66d8f4ab69bbb8c62bf.tar.gz
vcpkg-a434cc74ea515e6612bcb66d8f4ab69bbb8c62bf.zip
[outcome] Replace Outcome single header based port with full fat cmake install port (#15603)
* Replace Outcome single header based port with full fat cmake install port. * [outcome] Improve portfile.cmake * update baseline * Refactor @JackBoosY's changes to make the dependency SHA feature chosen. * update baseline * Fix outcome features so they actually work. * update baseline * [outcome] install usage * update baseline * [outcome] Always use vcpkg copies of dependencies * DO NOT MERGE YET, ONLY FOR INSPECTION BY PR REVIEW. 1. Break out these dependencies into standalone ports: - ned14-internal-quickcpplib - status-code 2. Add port for LLFIO. 3. Add dependency smoke tests for Outcome and LLFIO as per instructions. * Fix all remaining issues, including link failure. This changeset is now ready to merge into vcpkg. * Update versions. * Have LLFIO not build static or shared libs according to VCPKG_LIBRARY_LINKAGE. * Fix last commit breaking everything :) * Update versions. * Disable uwp support for LLFIO. * versions * Fix status code on GCC 6 and 7 * Don't download ntkernel-error-category if not on Windows. * Fix status-code on UWP. * Update versions. * Fix MSVC on ARM. * Apply all the feedback from the PR review, more or less. * versions * Update to latest, disable UWP for Outcome. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/status-code')
-rw-r--r--ports/status-code/CONTROL4
-rw-r--r--ports/status-code/portfile.cmake29
-rw-r--r--ports/status-code/usage4
3 files changed, 37 insertions, 0 deletions
diff --git a/ports/status-code/CONTROL b/ports/status-code/CONTROL
new file mode 100644
index 000000000..ac86283bd
--- /dev/null
+++ b/ports/status-code/CONTROL
@@ -0,0 +1,4 @@
+Source: status-code
+Version: 1.0.0-ab3cd821
+Homepage: https://github.com/ned14/status-code
+Description: Proposed SG14 status_code for the C++ standard (https://wg21.link/P1028).
diff --git a/ports/status-code/portfile.cmake b/ports/status-code/portfile.cmake
new file mode 100644
index 000000000..f369a3ba0
--- /dev/null
+++ b/ports/status-code/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ned14/status-code
+ REF ab3cd8217b6a89b91708a497f77f119c096fcce3
+ SHA512 266c79875fd6edb4a239768da29401193d5b710fe3d06208df010c5ca56bf80fa4558f572c738ab9290ee378437c882d072e93e8fb10fb1e3787b460f40a7102
+ HEAD_REF master
+)
+
+# Because status-code's deployed files are header-only, the debug build is not necessary
+set(VCPKG_BUILD_TYPE release)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PREFER_NINJA
+ OPTIONS
+ -DPROJECT_IS_DEPENDENCY=On
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status-code)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
+file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
+file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/status-code")
+
+file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/status-code/usage b/ports/status-code/usage
new file mode 100644
index 000000000..52d8cd77c
--- /dev/null
+++ b/ports/status-code/usage
@@ -0,0 +1,4 @@
+The package status-code provides CMake targets:
+
+ find_package(status-code CONFIG REQUIRED)
+ target_link_libraries(main PUBLIC status-code::hl)