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}"
|
2024-02-22 13:50:01 +08:00
|
|
|
SHA512 513718873ca5d1be5c781f92ef943432da4677582e15d25a247c1d3def087fdbd3fe787608d76f32a9b4f9253df88b40bd8ea570159f8106c338ba37e8a50a8d
|
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}
|
2023-08-15 08:49:39 +08:00
|
|
|
-DHWY_ENABLE_INSTALL=ON
|
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-08-15 08:49:39 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME hwy 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-08-15 08:49:39 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-11-05 03:21:48 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2023-08-15 08:49:39 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|