mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 12:29:32 +08:00
9d80704127
* [woff2] fix static linking and alternate toolchain First, this change teaches the woff2 CMake configuration to understand the vcpkg's custom unofficial-brotli pkg-config configuration in order to support static linking. This fixes a build failure on x64-linux or other triplets when VCPKG_LIBRARY_LINKAGE is set to static. Secondly, the CANONICAL_PREFIXES option for the woff2 CMake configuration has been changed to be on by default, otherwise custom triplets or toolchains using alternate compilers such as Clang/LLVM or other versions of GCC will fail. Leaving CANONICAL_PREFIXES set to OFF causes -no-canonical-prefixes to be passed to the compiler, which prevents symlinked compiler toolchains from working correctly. If a user does actually need non-canonical prefixes, chances are they will have a custom triplet or toolchain file that passes in -no-canonical-prefixes as a CFLAG for every port, and so setting it to ON here is a better default for vcpkg. * [woff2] update versions * [woff2] update control file * [woff2] update versions * [woff2] update ci.baseline.txt * Update ports/woff2/0001-unofficial-brotli.patch Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [woff2] regenerate 0001-unofficial-brotli.patch file * [woff2] update versions * [woff2] regenerate 0001-unofficial-brotli.patch file attempt #2 * [woff2] update versions Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
35 lines
917 B
CMake
35 lines
917 B
CMake
vcpkg_check_linkage(
|
|
ONLY_STATIC_LIBRARY
|
|
)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO google/woff2
|
|
REF v1.0.2
|
|
SHA512 c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d
|
|
HEAD_REF master
|
|
PATCHES
|
|
0001-unofficial-brotli.patch
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DCANONICAL_PREFIXES=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(COPY ${CURRENT_PACKAGES_DIR}/bin/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/woff2)
|
|
file(REMOVE_RECURSE
|
|
${CURRENT_PACKAGES_DIR}/bin
|
|
${CURRENT_PACKAGES_DIR}/debug/bin
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
)
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/woff2)
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/woff2 RENAME copyright)
|