vcpkg/ports/libunifex/portfile.cmake
Li Zeyang 4ffe8b020f
[libunifex] Update to 2021-12-07 (#21995)
* updated libunifex version

* remove comment

* run x-add-versions --all

* Update ports/libunifex/vcpkg.json

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* rerun x-add-version libunifex

* Update versions/l-/libunifex.json

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* update libunifex to 12-07

* x-add-version

* libunifex port update

force cpp20 as cpp17 build doesn't work with msvc. added a compile fix for externConstexpr and removed warnings with /EHsc

* Update libunifex.json

version update

* Update fix-compile-error.patch

relax clang warnings

* Update libunifex.json

git x-add-version libunifex

* remove unused

* x-add-versions

* remove old version log

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-12-14 20:56:53 -08:00

42 lines
1.3 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebookexperimental/libunifex
REF 9df21c58d34ce8a1cd3b15c3a7347495e29417a0
SHA512 2a1c6dbe0e66893be888c301e53b5d2813049047a817e9e1562acf2dec4ae79dec7db90409cd415c59238f2f3e2738e52f86a424041459390c720568ee52d860
HEAD_REF master
PATCHES
fix-compile-error.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test BUILD_TESTING
test UNIFEX_BUILD_EXAMPLES
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
${FEATURE_OPTIONS}
-DCMAKE_CXX_STANDARD:STRING=20
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unifex CONFIG_PATH lib/cmake/unifex)
vcpkg_copy_pdbs()
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()