@@ -465,8 +465,8 @@ fetchcontent_declare(pcre2
465465 URL_HASH MD5=88fe01e3f2ec144912ebecf7ef5cd595)
466466
467467fetchcontent_declare(tiff
468- URL "http ://downloads.sf.net/cbflib /tiff-4.0.6_rev_3Nov16 .tar.gz"
469- URL_HASH MD5=594d1811ce715f7d5ec586bf5e0c4732 )
468+ URL "https ://download.osgeo.org/libtiff /tiff-4.7.0 .tar.gz"
469+ URL_HASH MD5=3a0fa4a270a4a192b08913f88d0cfbdd )
470470
471471
472472#
@@ -630,26 +630,22 @@ set(CBF_WITH_LIBTIFF ON CACHE BOOL
630630mark_as_advanced (CBF_WITH_LIBTIFF)
631631
632632if (CBF_WITH_LIBTIFF)
633- # The first LibTIFF at https://gitlab.com/libtiff /libtiff with
633+ # The first LibTIFF at https://download.osgeo.org /libtiff with
634634 # native CMake support seems to be 4.0.5. The first version that
635635 # builds on current MSYS2 is 4.0.9.
636636 #
637637 # 4.0.3-rev-29Sep13 appears to have CMakeLists.txt patched in but
638638 # fails on MSYS2: multiple definition of ua_wcsicmp.
639+ #
640+ # 4.0.6_rev_3Nov16 fails on MSYS2: _FILE_OFFSET_BITS not defined
641+ #
642+ # 4.0.8 fails on MSYS2: _FILE_OFFSET_BITS
639643 set (tiff-contrib OFF CACHE INTERNAL "Build TIFF contrib" )
640644 set (tiff-docs OFF CACHE INTERNAL "Build TIFF documentation" )
641645 set (tiff-tests OFF CACHE INTERNAL "Build TIFF tests" )
642646 set (tiff-tools OFF CACHE INTERNAL "Build TIFF tools" )
643647 fetchcontent_makeavailable(tiff)
644648
645-
646- # Always use tiffconf.h and tiffio.h from ${tiff_BUILD_DIR}/libtiff
647- # and ${tiff_SOURCE_DIR}/libtiff, respectively, rather than
648- # system-supplied headers.
649- target_include_directories (tiff PUBLIC
650- "$<BUILD_INTERFACE:${tiff_BINARY_DIR} /libtiff>"
651- "$<BUILD_INTERFACE:${tiff_SOURCE_DIR} /libtiff>" )
652-
653649else ()
654650 # find_package(TIFF) appears to miss the dependencies (Lerc, jbig,
655651 # etc) for a static LibTIFF. pkg_check_modules(... IMPORTED_TARGET
@@ -661,7 +657,7 @@ else()
661657 # cmake_pkg_config(), because e.g. Debian does not ship CMake config
662658 # files in their dev packages.
663659 find_package (PkgConfig REQUIRED)
664- pkg_check_modules(tiff REQUIRED IMPORTED_TARGET libtiff-4)
660+ pkg_check_modules(tiff REQUIRED IMPORTED_TARGET libtiff-4>=4.0.10 )
665661 add_library (tiff ALIAS PkgConfig::tiff)
666662endif ()
667663
0 commit comments