aboutsummaryrefslogtreecommitdiff
path: root/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch
blob: 14929e10c24a97e34518d2ea9ae15587345d665b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001
From: Hiroshi Miura <miurahr@linux.com>
Date: Wed, 14 Feb 2018 12:32:11 +0900
Subject: [PATCH 3/5] Fix cmake TIFF detection

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
---
 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