2016-09-19 11:50:08 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-03-24 12:59:18 +08:00
|
|
|
|
2018-01-19 13:13:06 +08:00
|
|
|
set(LIBTIFF_VERSION 4.0.9)
|
2017-03-24 12:59:18 +08:00
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-03-24 12:59:18 +08:00
|
|
|
URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz"
|
|
|
|
FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz"
|
2018-09-12 04:11:51 +08:00
|
|
|
SHA512 04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
2018-09-12 04:11:51 +08:00
|
|
|
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
|
2016-11-11 09:52:19 +08:00
|
|
|
)
|
|
|
|
|
2018-01-04 07:19:52 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
|
|
set (TIFF_CXX_TARGET -Dcxx=OFF)
|
|
|
|
endif()
|
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_configure_cmake(
|
2016-09-29 08:05:56 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-03-24 05:33:22 +08:00
|
|
|
PREFER_NINJA
|
2016-11-11 09:52:19 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TOOLS=OFF
|
|
|
|
-DBUILD_DOCS=OFF
|
|
|
|
-DBUILD_CONTRIB=OFF
|
|
|
|
-DBUILD_TESTS=OFF
|
2017-03-24 05:33:22 +08:00
|
|
|
-Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing.
|
|
|
|
-Djpeg12=OFF
|
2018-01-04 07:19:52 +08:00
|
|
|
${TIFF_CXX_TARGET}
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
|
|
${CURRENT_PACKAGES_DIR}/share
|
|
|
|
)
|
2018-08-03 15:14:51 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff)
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/tiff
|
|
|
|
@ONLY
|
|
|
|
)
|
2016-11-11 09:52:19 +08:00
|
|
|
file(INSTALL
|
2016-09-29 08:05:56 +08:00
|
|
|
${SOURCE_PATH}/COPYRIGHT
|
2016-09-19 11:50:08 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff
|
2016-11-11 09:52:19 +08:00
|
|
|
RENAME copyright
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
2018-09-12 04:11:51 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff)
|
2016-11-03 07:25:40 +08:00
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2018-09-12 04:11:51 +08:00
|
|
|
|
|
|
|
vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE)
|