@@ -62,8 +62,11 @@ ELSE(WIN32)
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
64
IF (GDAL_VERSION_MAJOR LESS 2)
65
- MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.0 or higher." )
65
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.1 or higher." )
66
66
ENDIF (GDAL_VERSION_MAJOR LESS 2)
67
+ IF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
68
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.1 or higher." )
69
+ ENDIF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
67
70
68
71
ENDIF (GDAL_LIBRARY)
69
72
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
@@ -103,8 +106,11 @@ ELSE(WIN32)
103
106
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
104
107
# According to INSTALL, 2.0+ is required
105
108
IF (GDAL_VERSION_MAJOR LESS 2)
106
- MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.0 or higher." )
109
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.1 or higher." )
107
110
ENDIF (GDAL_VERSION_MAJOR LESS 2)
111
+ IF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
112
+ MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION} ). Use 2.1 or higher." )
113
+ ENDIF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
108
114
109
115
# set INCLUDE_DIR to prefix+include
110
116
EXEC_PROGRAM (${GDAL_CONFIG}
0 commit comments