From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Wed, 14 Feb 2018 12:32:11 +0900 Subject: [PATCH 3/5] Fix cmake TIFF detection Signed-off-by: Hiroshi Miura --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55ececf..1e2fe3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,7 +191,8 @@ IF(WITH_TIFF) IF(TIFF_FOUND) # Confirm required API is available INCLUDE(CheckFunctionExists) - SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) + FIND_PACKAGE(LibLZMA) + SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) IF(NOT HAVE_TIFFOPEN) @@ -204,7 +205,7 @@ IF(WITH_TIFF) SET(TIFF_FOUND) # ReSET to NOT found for TIFF library MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") ENDIF() - + SET(CMAKE_REQUIRED_LIBRARIES) INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) ADD_DEFINITIONS(-DHAVE_TIFF=1) ENDIF(TIFF_FOUND) -- 2.16.1