2021-12-30 03:28:03 +08:00
|
|
|
vcpkg_from_gitlab(
|
|
|
|
GITLAB_URL https://gitlab.com
|
2018-09-12 04:11:51 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-12-30 03:28:03 +08:00
|
|
|
REPO libtiff/libtiff
|
2022-12-20 03:26:02 +08:00
|
|
|
REF "v${VERSION}"
|
2023-10-07 07:42:16 +08:00
|
|
|
SHA512 ef2f1d424219d9e245069b7d23e78f5e817cf6ee516d46694915ab6c8909522166f84997513d20a702f4e52c3f18467813935b328fafa34bea5156dee00f66fa
|
2021-12-30 03:28:03 +08:00
|
|
|
HEAD_REF master
|
2022-06-11 01:38:30 +08:00
|
|
|
PATCHES
|
|
|
|
FindCMath.patch
|
2024-02-09 14:41:50 +08:00
|
|
|
requires-lerc.patch
|
2016-11-11 09:52:19 +08:00
|
|
|
)
|
|
|
|
|
2019-11-22 09:00:19 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-06-10 07:33:25 +08:00
|
|
|
FEATURES
|
|
|
|
cxx cxx
|
|
|
|
jpeg jpeg
|
2022-12-31 17:30:53 +08:00
|
|
|
jpeg CMAKE_REQUIRE_FIND_PACKAGE_JPEG
|
2024-01-04 09:39:26 +08:00
|
|
|
libdeflate libdeflate
|
|
|
|
libdeflate CMAKE_REQUIRE_FIND_PACKAGE_Deflate
|
2024-02-09 14:41:50 +08:00
|
|
|
lerc lerc
|
|
|
|
lerc CMAKE_REQUIRE_FIND_PACKAGE_LERC
|
2021-06-10 07:33:25 +08:00
|
|
|
lzma lzma
|
2023-06-27 11:54:48 +08:00
|
|
|
lzma CMAKE_REQUIRE_FIND_PACKAGE_liblzma
|
2022-12-20 03:26:02 +08:00
|
|
|
tools tiff-tools
|
2021-06-10 07:33:25 +08:00
|
|
|
webp webp
|
2022-12-31 17:30:53 +08:00
|
|
|
webp CMAKE_REQUIRE_FIND_PACKAGE_WebP
|
2021-06-10 07:33:25 +08:00
|
|
|
zip zlib
|
2022-12-31 17:30:53 +08:00
|
|
|
zip CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
|
2021-06-10 07:33:25 +08:00
|
|
|
zstd zstd
|
2022-12-31 17:30:53 +08:00
|
|
|
zstd CMAKE_REQUIRE_FIND_PACKAGE_ZSTD
|
2019-11-22 09:00:19 +08:00
|
|
|
)
|
|
|
|
|
2021-06-10 07:33:25 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2016-11-11 09:52:19 +08:00
|
|
|
OPTIONS
|
2019-11-22 09:00:19 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2023-06-27 11:54:48 +08:00
|
|
|
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
2022-12-20 03:26:02 +08:00
|
|
|
-Dtiff-docs=OFF
|
|
|
|
-Dtiff-contrib=OFF
|
|
|
|
-Dtiff-tests=OFF
|
2017-03-24 05:33:22 +08:00
|
|
|
-Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing.
|
|
|
|
-Djpeg12=OFF
|
2019-08-13 05:42:45 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON
|
2022-12-31 17:30:53 +08:00
|
|
|
-DZSTD_HAVE_DECOMPRESS_STREAM=ON
|
2023-04-21 06:56:16 +08:00
|
|
|
-DHAVE_JPEGTURBO_DUAL_MODE_8_12=OFF
|
2022-04-14 02:26:56 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DCMAKE_DEBUG_POSTFIX=d # tiff sets "d" for MSVC only.
|
2022-12-31 17:30:53 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2024-01-04 09:39:26 +08:00
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_GLUT
|
|
|
|
CMAKE_DISABLE_FIND_PACKAGE_OpenGL
|
2022-12-31 17:30:53 +08:00
|
|
|
ZSTD_HAVE_DECOMPRESS_STREAM
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
|
2021-06-10 07:33:25 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-01-23 06:02:31 +08:00
|
|
|
|
2023-06-27 11:54:48 +08:00
|
|
|
# CMake config wasn't packaged in the past and is not yet usable now,
|
|
|
|
# cf. https://gitlab.com/libtiff/libtiff/-/merge_requests/496
|
|
|
|
# vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/tiff")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
|
2022-06-01 06:13:56 +08:00
|
|
|
|
2021-01-23 06:02:31 +08:00
|
|
|
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libtiff-4.pc")
|
|
|
|
if(EXISTS "${_file}")
|
2021-06-10 07:33:25 +08:00
|
|
|
vcpkg_replace_string("${_file}" "-ltiff" "-ltiffd")
|
2021-01-23 06:02:31 +08:00
|
|
|
endif()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-06-10 07:33:25 +08:00
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
file(REMOVE_RECURSE
|
2021-06-10 07:33:25 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
2016-11-03 07:25:40 +08:00
|
|
|
|
2021-06-10 07:33:25 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
|
2018-09-12 04:11:51 +08:00
|
|
|
|
2021-06-10 07:33:25 +08:00
|
|
|
if ("tools" IN_LIST FEATURES)
|
2022-12-20 03:26:02 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES
|
2021-06-10 07:33:25 +08:00
|
|
|
tiffcp
|
|
|
|
tiffdump
|
|
|
|
tiffinfo
|
|
|
|
tiffset
|
|
|
|
tiffsplit
|
2022-12-20 03:26:02 +08:00
|
|
|
AUTO_CLEAN
|
2021-06-10 07:33:25 +08:00
|
|
|
)
|
2019-11-22 09:00:19 +08:00
|
|
|
endif()
|
|
|
|
|
2019-05-29 07:58:00 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2024-01-04 09:39:26 +08:00
|
|
|
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2022-12-20 03:26:02 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
|