Skip to content
Permalink
Browse files

Bump required GDAL version from 2.0 to 2.1

Because we need GDALTranslate()
  • Loading branch information
elpaso committed Aug 22, 2017
1 parent 73fdb25 commit 35e49ed90a27b9285929ff4baebed0a66dd09911
Showing with 9 additions and 3 deletions.
  1. +1 −1 INSTALL
  2. +8 −2 cmake/FindGDAL.cmake
@@ -102,7 +102,7 @@ Required build dependencies:
- Sqlite3 >= 3.0.0
- SpatiaLite
- libspatialindex
- GDAL/OGR >= 2.0
- GDAL/OGR >= 2.1
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
- expat >= 1.95
- QScintilla2
@@ -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]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
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)
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)
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)
# According to INSTALL, 2.0+ is required
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)
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
EXEC_PROGRAM(${GDAL_CONFIG}

1 comment on commit 35e49ed

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson commented on 35e49ed Aug 25, 2017

I'm pretty certain we have a lot of ifdefed code for gdal 2.0 handing (vs 2.1). Have you checked to see if any of this can be cleaned up?

Please sign in to comment.
You can’t perform that action at this time.