2022-11-03 23:14:09 +01:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
2021-11-04 20:21:48 +01:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/highway
|
2022-11-03 23:14:09 +01:00
|
|
|
REF ${VERSION}
|
|
|
|
SHA512 d4c57b297f073dd83535c60151bbc7e7960262990d89bc78882adeb457ed7cf6d54ec852ecb1847c7760de3992267b66538971d20a2c2935828d95d99ddb3a3f
|
2021-11-04 20:21:48 +01:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-11-03 23:14:09 +01:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
contrib HWY_ENABLE_CONTRIB
|
|
|
|
)
|
|
|
|
|
2021-11-04 20:21:48 +01:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-11-03 23:14:09 +01:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
-DHWY_ENABLE_EXAMPLES=OFF
|
|
|
|
-DHWY_ENABLE_TESTS=OFF
|
2021-11-04 20:21:48 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
# remove test-related pkg-config files that break vcpkg_fixup_pkgconfig
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libhwy-test.pc")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libhwy-test.pc")
|
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|