@@ -61,13 +61,9 @@ ELSE(WIN32)
61
61
ENDIF (NOT GDAL_VERSION )
62
62
STRING (REGEX REPLACE "([0-9]+)\\ .([0-9]+)\\ .([0-9]+)" "\\ 1" GDAL_VERSION_MAJOR "${GDAL_VERSION} " )
63
63
STRING (REGEX REPLACE "([0-9]+)\\ .([0-9]+)\\ .([0-9]+)" "\\ 2" GDAL_VERSION_MINOR "${GDAL_VERSION} " )
64
- IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION EQUAL 1 AND GDAL_VERSION_MINOR LESS 4 ))
65
- MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 1.4.0 or higher." )
66
- ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION EQUAL 1 AND GDAL_VERSION_MINOR LESS 4 ))
67
-
68
- IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11 ))
69
- MESSAGE (WARNING "GDAL version is too old (${GDAL_VERSION} ) to support GeoPackage. 1.11.0 or higher is recommended." )
70
- ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11 ))
64
+ IF (GDAL_VERSION_MAJOR LESS 2 )
65
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.0 or higher." )
66
+ ENDIF (GDAL_VERSION_MAJOR LESS 2 )
71
67
72
68
ENDIF (GDAL_LIBRARY )
73
69
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE )
@@ -105,14 +101,10 @@ ELSE(WIN32)
105
101
106
102
# check for gdal version
107
103
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
108
- # According to INSTALL, 1.4.0+ is required
109
- IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 4 ))
110
- MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 1.4.0 or higher." )
111
- ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 4 ))
112
-
113
- IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11 ))
114
- MESSAGE (WARNING "GDAL version is too old (${GDAL_VERSION} ) to support GeoPackage. 1.11.0 or higher is recommended." )
115
- ENDIF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 11 ))
104
+ # According to INSTALL, 2.0+ is required
105
+ IF (GDAL_VERSION_MAJOR LESS 2 )
106
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.0 or higher." )
107
+ ENDIF (GDAL_VERSION_MAJOR LESS 2 )
116
108
117
109
# set INCLUDE_DIR to prefix+include
118
110
EXEC_PROGRAM (${GDAL_CONFIG}
0 commit comments