From ba3932d81636350876847a8b37ab6c0e9a4d425d Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 4 Jul 2018 21:23:18 +0200 Subject: [PATCH] Require libtiff >= 4.0.4 Compilation fails when using libtiff < 4.0.4 on PHOTOMETRIC_CFA not being declared. This commit introduces a minimum libtiff requirement of 4.0.4, which in turn required making cmake-2.8.8 the minimum required version so as to avoid having to bundle findTIFF.cmake. Closes #4653 --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dcf6793d..ea95d818c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,8 @@ -if(WIN32) - cmake_minimum_required(VERSION 2.8.4) -elseif(APPLE) +if(APPLE) cmake_minimum_required(VERSION 3.3) CMAKE_POLICY(SET CMP0025 NEW) else() - cmake_minimum_required(VERSION 2.6) + cmake_minimum_required(VERSION 2.8.8) endif() # Must stay before the PROJECT() command: @@ -318,9 +316,9 @@ pkg_check_modules(LCMS REQUIRED lcms2>=2.6) pkg_check_modules(EXPAT REQUIRED expat>=2.1) pkg_check_modules(FFTW3F REQUIRED fftw3f) pkg_check_modules(IPTCDATA REQUIRED libiptcdata) +pkg_check_modules(TIFF REQUIRED libtiff-4>=4.0.4) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) -find_package(TIFF REQUIRED) find_package(ZLIB REQUIRED) if(WITH_SYSTEM_KLT) find_package(KLT REQUIRED)