2021-03-31 01:17:02 +08:00
|
|
|
# Outcome is composed of other third party libraries:
|
|
|
|
# Outcome
|
|
|
|
# <= status-code
|
|
|
|
# <= quickcpplib
|
|
|
|
# <= byte-lite
|
|
|
|
# <= gsl-lite
|
|
|
|
# <= Optional
|
|
|
|
#
|
|
|
|
# byte-lite and gsl-lite are in vcpkg, but may not be versions
|
|
|
|
# known to be compatible with Outcome. It has occurred in the
|
|
|
|
# past that newer versions were severely broken with Outcome.
|
|
|
|
#
|
|
|
|
# One can fetch an 'all sources' tarball from
|
|
|
|
# https://github.com/ned14/outcome/releases which contains
|
|
|
|
# the exact copy of those third party libraries known to
|
|
|
|
# have passed Outcome's CI process.
|
|
|
|
|
2022-09-03 01:40:12 +08:00
|
|
|
if ("polyfill-cxx20" IN_LIST FEATURES)
|
|
|
|
message(WARNING [=[
|
|
|
|
Outcome depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's and Outcome's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against.
|
|
|
|
]=])
|
|
|
|
endif()
|
2021-03-31 01:17:02 +08:00
|
|
|
|
2019-08-28 14:52:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ned14/outcome
|
2023-11-15 05:11:02 +08:00
|
|
|
REF v${VERSION}
|
|
|
|
SHA512 2057f2f967f7aad3f78d081c72130122c1f99b837ce23ec9de9bfe0cd0fc493ce7085071cb2a54a840252ba0d82e14d99d622c1e0fdf9a8a20f41e5f89fa4645
|
2019-08-28 14:52:17 +08:00
|
|
|
HEAD_REF develop
|
2021-03-31 01:17:02 +08:00
|
|
|
PATCHES
|
|
|
|
)
|
|
|
|
|
|
|
|
# Because outcome's deployed files are header-only, the debug build is not necessary
|
|
|
|
set(VCPKG_BUILD_TYPE release)
|
|
|
|
|
|
|
|
# Use Outcome's own build process, skipping examples and tests.
|
2022-09-03 01:40:12 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-03-31 01:17:02 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2023-11-15 05:11:02 +08:00
|
|
|
-Doutcome_IS_DEPENDENCY=ON
|
|
|
|
"-DCMAKE_PREFIX_PATH=${CURRENT_INSTALLED_DIR}"
|
2022-09-03 01:40:12 +08:00
|
|
|
-DOUTCOME_BUNDLE_EMBEDDED_STATUS_CODE=OFF
|
2021-03-31 01:17:02 +08:00
|
|
|
-DOUTCOME_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
2022-09-20 02:35:37 +08:00
|
|
|
-DCXX_CONCEPTS_FLAGS=
|
2021-03-31 01:17:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if("run-tests" IN_LIST FEATURES)
|
2022-09-03 01:40:12 +08:00
|
|
|
vcpkg_cmake_build(TARGET test)
|
2021-03-31 01:17:02 +08:00
|
|
|
endif()
|
|
|
|
|
2022-09-03 01:40:12 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-03-31 01:17:02 +08:00
|
|
|
|
2022-09-03 01:40:12 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/outcome)
|
2021-03-31 01:17:02 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
2019-08-28 14:52:17 +08:00
|
|
|
|
2021-03-31 01:17:02 +08:00
|
|
|
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2022-09-10 02:55:55 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Licence.txt")
|