2021-08-31 00:51:19 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO facebookexperimental/libunifex
|
2023-07-12 02:53:48 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 91a02d50e45c0458e25bd51c50fb6e98a668298733a3e66e8eb5353b0a5ea78a3656fe83b873e0ea50b26c6a7de572a663160b458c0fb1272ffa8bfd7715d1cc
|
|
|
|
HEAD_REF main
|
2021-08-31 00:51:19 +08:00
|
|
|
PATCHES
|
2021-12-15 12:56:53 +08:00
|
|
|
fix-compile-error.patch
|
2023-03-29 02:32:42 +08:00
|
|
|
fix-linux-timespec.patch
|
2021-08-31 00:51:19 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2023-01-26 04:22:44 +08:00
|
|
|
coroutines CXX_COROUTINES_HAVE_COROUTINES
|
2021-08-31 00:51:19 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2021-12-15 12:56:53 +08:00
|
|
|
-DCMAKE_CXX_STANDARD:STRING=20
|
2023-06-10 16:27:26 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DUNIFEX_BUILD_EXAMPLES=OFF
|
2021-08-31 00:51:19 +08:00
|
|
|
)
|
2021-12-15 12:56:53 +08:00
|
|
|
|
2021-08-31 00:51:19 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unifex CONFIG_PATH lib/cmake/unifex)
|
|
|
|
vcpkg_copy_pdbs()
|
2021-12-21 00:37:23 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-08-31 00:51:19 +08:00
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/unifex/config.hpp.in"
|
|
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/linux")
|
|
|
|
elseif(VCPKG_TARGET_IS_LINUX)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/win32")
|
|
|
|
endif()
|