2020-10-14 05:38:05 +08:00
|
|
|
diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt
|
|
|
|
index 46331ad..80fe121 100644
|
|
|
|
--- a/libgeotiff/CMakeLists.txt
|
|
|
|
+++ b/libgeotiff/CMakeLists.txt
|
|
|
|
@@ -122,13 +122,14 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff)
|
|
|
|
# TIFF support - required, default=ON
|
|
|
|
SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built")
|
2019-10-18 08:15:52 +08:00
|
|
|
|
2020-10-14 05:38:05 +08:00
|
|
|
-FIND_PACKAGE(PROJ NO_MODULE QUIET)
|
|
|
|
-if (NOT PROJ_FOUND)
|
|
|
|
+FIND_PACKAGE(PROJ4 CONFIG REQUIRED)
|
|
|
|
+if (NOT PROJ4_FOUND)
|
|
|
|
FIND_PACKAGE(PROJ)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
-IF(PROJ_FOUND)
|
|
|
|
- INCLUDE_DIRECTORIES(${PROJ_INCLUDE_DIR})
|
|
|
|
+IF(PROJ4_FOUND)
|
|
|
|
+ INCLUDE_DIRECTORIES(${PROJ4_INCLUDE_DIRS})
|
|
|
|
+ ADD_DEFINITIONS(-DHAVE_LIBPROJ=1 -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
|
|
|
|
ELSE()
|
|
|
|
MESSAGE(FATAL_ERROR "Failed to detect PROJ >= 6")
|
2019-10-18 08:15:52 +08:00
|
|
|
ENDIF()
|
2020-10-14 05:38:05 +08:00
|
|
|
@@ -361,7 +362,7 @@ SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES
|
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET}
|
|
|
|
${TIFF_LIBRARIES}
|
|
|
|
- ${PROJ_LIBRARIES}
|
|
|
|
+ ${PROJ4_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${JPEG_LIBRARIES})
|
2019-10-18 08:15:52 +08:00
|
|
|
|