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}"
|
|
|
|
SHA512 fc419c862e1686b6278081e8e10da41dc2bdfbd386a29b59e21a57375a47d3eeb5c7297e3078c78007b212121d936640b192a26a16c941e73cf599f24e081021
|
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-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)
|