mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 06:19:01 +08:00
36 lines
1.2 KiB
CMake
36 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO google/brotli
|
|
REF v${VERSION} # v1.1.0
|
|
SHA512 6eb280d10d8e1b43d22d00fa535435923c22ce8448709419d676ff47d4a644102ea04f488fc65a179c6c09fee12380992e9335bad8dfebd5d1f20908d10849d9
|
|
HEAD_REF master
|
|
PATCHES
|
|
install.patch
|
|
fix-arm-uwp.patch
|
|
pkgconfig.patch
|
|
emscripten.patch
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBROTLI_DISABLE_TESTS=ON
|
|
)
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/unofficial-brotli PACKAGE_NAME unofficial-brotli)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
|
|
|
# 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")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|