Bump required GDAL version from 2.0 to 2.1

Because we need GDALTranslate()
This commit is contained in:
Alessandro Pasotti 2017-08-22 17:25:50 +02:00
parent 73fdb25449
commit 35e49ed90a
2 changed files with 9 additions and 3 deletions

View File

@ -102,7 +102,7 @@ Required build dependencies:
- Sqlite3 >= 3.0.0 - Sqlite3 >= 3.0.0
- SpatiaLite - SpatiaLite
- libspatialindex - libspatialindex
- GDAL/OGR >= 2.0 - GDAL/OGR >= 2.1
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar) - Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
- expat >= 1.95 - expat >= 1.95
- QScintilla2 - QScintilla2

View File

@ -62,8 +62,11 @@ ELSE(WIN32)
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}") STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}") STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
IF (GDAL_VERSION_MAJOR LESS 2) IF (GDAL_VERSION_MAJOR LESS 2)
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.0 or higher.") MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.1 or higher.")
ENDIF (GDAL_VERSION_MAJOR LESS 2) ENDIF (GDAL_VERSION_MAJOR LESS 2)
IF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.1 or higher.")
ENDIF( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
ENDIF (GDAL_LIBRARY) ENDIF (GDAL_LIBRARY)
SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE) SET (CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_save} CACHE STRING "" FORCE)
@ -103,8 +106,11 @@ ELSE(WIN32)
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro) # version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
# According to INSTALL, 2.0+ is required # According to INSTALL, 2.0+ is required
IF (GDAL_VERSION_MAJOR LESS 2) IF (GDAL_VERSION_MAJOR LESS 2)
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.0 or higher.") MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.1 or higher.")
ENDIF (GDAL_VERSION_MAJOR LESS 2) ENDIF (GDAL_VERSION_MAJOR LESS 2)
IF ( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 2.1 or higher.")
ENDIF( (GDAL_VERSION_MAJOR EQUAL 2) AND (GDAL_VERSION_MINOR LESS 1) )
# set INCLUDE_DIR to prefix+include # set INCLUDE_DIR to prefix+include
EXEC_PROGRAM(${GDAL_CONFIG} EXEC_PROGRAM(${GDAL_CONFIG}