2017-05-24 06:08:19 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/brotli
|
2023-09-26 15:28:57 +08:00
|
|
|
REF v${VERSION} # v1.1.0
|
|
|
|
SHA512 6eb280d10d8e1b43d22d00fa535435923c22ce8448709419d676ff47d4a644102ea04f488fc65a179c6c09fee12380992e9335bad8dfebd5d1f20908d10849d9
|
2017-05-24 06:08:19 +08:00
|
|
|
HEAD_REF master
|
2020-02-26 06:18:40 +08:00
|
|
|
PATCHES
|
|
|
|
install.patch
|
|
|
|
fix-arm-uwp.patch
|
2020-08-07 04:07:46 +08:00
|
|
|
pkgconfig.patch
|
2023-10-14 01:53:31 +08:00
|
|
|
emscripten.patch
|
2017-05-24 06:08:19 +08:00
|
|
|
)
|
2017-05-24 04:09:58 +08:00
|
|
|
|
2022-07-27 01:29:21 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBROTLI_DISABLE_TESTS=ON
|
2017-05-24 04:09:58 +08:00
|
|
|
)
|
2022-07-27 01:29:21 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-02-26 06:18:40 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-12-03 01:39:16 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-07-27 01:29:21 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/unofficial-brotli PACKAGE_NAME unofficial-brotli)
|
2020-08-07 04:07:46 +08:00
|
|
|
|
2022-07-27 01:29:21 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
2023-10-14 01:53:31 +08:00
|
|
|
|
|
|
|
# Under emscripten the brotli executable tool is produced with .js extension but vcpkg_copy_tools
|
|
|
|
# has no special behaviour in this case and searches for the tool name with no extension
|
|
|
|
if(VCPKG_TARGET_IS_EMSCRIPTEN)
|
|
|
|
set(TOOL_SUFFIX ".js" )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES "brotli${TOOL_SUFFIX}" SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/brotli")
|
2017-12-13 22:20:07 +08:00
|
|
|
|
2022-12-03 01:39:16 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-09-26 15:28:57 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|