2021-11-05 03:21:48 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/highway
|
2023-01-31 09:09:39 +08:00
|
|
|
REF "${VERSION}"
|
2023-07-06 02:18:26 +08:00
|
|
|
SHA512 75aaa0a3f97c6b044acb146ac4db20c1d813c4215b9c1620e72352d00c136939db7059f599122d6600e385bffa8b24d7fd9c1fe09772f4941e5300767a8c68dd
|
2021-11-05 03:21:48 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-11-04 06:14:09 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
contrib HWY_ENABLE_CONTRIB
|
|
|
|
)
|
|
|
|
|
2021-11-05 03:21:48 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-01-31 09:09:39 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2022-11-04 06:14:09 +08:00
|
|
|
-DHWY_ENABLE_EXAMPLES=OFF
|
|
|
|
-DHWY_ENABLE_TESTS=OFF
|
2021-11-05 03:21:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
2023-07-06 02:18:26 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/hwy)
|
2021-11-05 03:21:48 +08:00
|
|
|
|
2023-01-31 09:09:39 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hwy/highway_export.h" "defined(HWY_SHARED_DEFINE)" "1")
|
|
|
|
endif()
|
2021-11-05 03:21:48 +08:00
|
|
|
|
2023-01-31 09:09:39 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
# remove test-related pkg-config files that break vcpkg_fixup_pkgconfig
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libhwy-test.pc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libhwy-test.pc"
|
|
|
|
)
|
2021-11-05 03:21:48 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|