mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Patch from strk to specify minimum gdal of 1.4
git-svn-id: http://svn.osgeo.org/qgis/trunk@9672 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
e9f6cecda8
commit
f10517fdfd
@ -49,6 +49,25 @@ ELSE(WIN32)
|
||||
# MESSAGE("DBG GDAL_CONFIG ${GDAL_CONFIG}")
|
||||
|
||||
IF (GDAL_CONFIG)
|
||||
|
||||
## extract gdal version
|
||||
EXEC_PROGRAM(${GDAL_CONFIG}
|
||||
ARGS --version
|
||||
OUTPUT_VARIABLE 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}")
|
||||
|
||||
# MESSAGE("DBG GDAL_VERSION ${GDAL_VERSION}")
|
||||
# MESSAGE("DBG GDAL_VERSION_MAJOR ${GDAL_VERSION_MAJOR}")
|
||||
# MESSAGE("DBG GDAL_VERSION_MINOR ${GDAL_VERSION_MINOR}")
|
||||
|
||||
# check for gdal version
|
||||
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
|
||||
# According to INSTALL, 1.4.0+ is required
|
||||
IF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
|
||||
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.")
|
||||
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
|
||||
|
||||
# set INCLUDE_DIR to prefix+include
|
||||
EXEC_PROGRAM(${GDAL_CONFIG}
|
||||
ARGS --prefix
|
||||
|
Loading…
x
Reference in New Issue
Block a user