From 32fc01c08f0fdd154c3b515a3c24165afa981ce3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 7 Jan 2020 14:50:44 +0100 Subject: CMake: use more neutral DISABLE_TIFF switch (refs https://github.com/OSGeo/PROJ/pull/1790#discussion_r363750361) --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2125b93a..0d5524db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,11 +140,15 @@ ENDIF() # Check for libtiff ################################################################################ -option(DISABLE_TIFF_IS_STRONGLY_DISCOURAGED "Disable TIFF support (strongly discouraged !)" OFF) -mark_as_advanced(DISABLE_TIFF_IS_STRONGLY_DISCOURAGED) -if(NOT DISABLE_TIFF_IS_STRONGLY_DISCOURAGED) +option(DISABLE_TIFF "Disable TIFF support" OFF) +mark_as_advanced(DISABLE_TIFF) +if(DISABLE_TIFF) + message(WARNING "TIFF support has been disabled and will result in the inability to read some grids") +else() find_package(TIFF REQUIRED) - if(NOT TIFF_FOUND) + if(TIFF_FOUND) + boost_report_value(TIFF_FOUND) + else() message(SEND_ERROR "libtiff dependency not found!") endif() add_definitions(-DTIFF_ENABLED) -- cgit v1.2.3