mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 15:27:50 +08:00
4f7460f685
* [tiff]: disable libwebp support. Since version 4.0.10, libtiff supports optional compression modes using either libweb or zstd. When libtiff is built, and libwebp and/or zstd are found anywhere on the system, these modes will be enabled. However, the respective libraries are not added as link targets, so this will result in linker errors for any unsuspecting project using libtiff. Since zstd support was already disabled by a previous commit, I have also simply disabled libwebp support to fix this issue. A more proper fix might be to add both libwebp and zstd as required libtiff dependencies, and to patch libtiff's CMakeLists.txt, such that these libraries are properly linked to. However, it is currently very unlikely to encounter TIFF images in the wild compressed using either of these methods, so the effect of disabling support may not be noticeable at all. * [tiff] Change CONTROL version
63 lines
1.7 KiB
CMake
63 lines
1.7 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
set(LIBTIFF_VERSION 4.0.10)
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz"
|
|
FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz"
|
|
SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8
|
|
)
|
|
vcpkg_extract_source_archive_ex(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE}
|
|
REF ${LIBTIFF_VERSION}
|
|
PATCHES
|
|
add-component-options.patch
|
|
fix-cxx-shared-libs.patch
|
|
crt-secure-no-deprecate.patch
|
|
fix-stddef.patch
|
|
)
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
set (TIFF_CXX_TARGET -Dcxx=OFF)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DBUILD_TOOLS=OFF
|
|
-DBUILD_DOCS=OFF
|
|
-DBUILD_CONTRIB=OFF
|
|
-DBUILD_TESTS=OFF
|
|
-Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing.
|
|
-Djpeg12=OFF
|
|
-Dwebp=OFF
|
|
-Dzstd=OFF
|
|
${TIFF_CXX_TARGET}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
file(REMOVE_RECURSE
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
${CURRENT_PACKAGES_DIR}/share
|
|
)
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff)
|
|
configure_file(
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
${CURRENT_PACKAGES_DIR}/share/tiff
|
|
@ONLY
|
|
)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/COPYRIGHT
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff
|
|
RENAME copyright
|
|
)
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE)
|