@@ -61,13 +61,9 @@ ELSE(WIN32)
6161 ENDIF (NOT GDAL_VERSION)
6262 STRING (REGEX REPLACE "([0-9]+)\\ .([0-9]+)\\ .([0-9]+)" "\\ 1" GDAL_VERSION_MAJOR "${GDAL_VERSION} " )
6363 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)
7167
7268 ENDIF (GDAL_LIBRARY)
7369 SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
@@ -105,14 +101,10 @@ ELSE(WIN32)
105101
106102 # check for gdal version
107103 # 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)
116108
117109 # set INCLUDE_DIR to prefix+include
118110 EXEC_PROGRAM (${GDAL_CONFIG}
0 commit comments