Skip to content

Commit 8b2445e

Browse files
committedMay 17, 2012
fix GDAL version check
1 parent b2dbfc8 commit 8b2445e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎cmake/FindGDAL.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ELSE(WIN32)
5959
ENDIF (NOT GDAL_VERSION)
6060
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GDAL_VERSION_MAJOR "${GDAL_VERSION}")
6161
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GDAL_VERSION_MINOR "${GDAL_VERSION}")
62-
IF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
62+
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
6363
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.")
6464
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
6565
ENDIF (GDAL_LIBRARY)
@@ -95,7 +95,7 @@ ELSE(WIN32)
9595
# check for gdal version
9696
# version 1.2.5 is known NOT to be supported (missing CPL_STDCALL macro)
9797
# According to INSTALL, 1.4.0+ is required
98-
IF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
98+
IF (GDAL_VERSION_MAJOR LESS 1 OR (GDAL_VERSION_MAJOR EQUAL 1 AND GDAL_VERSION_MINOR LESS 4))
9999
MESSAGE (FATAL_ERROR "GDAL version is too old (${GDAL_VERSION}). Use 1.4.0 or higher.")
100100
ENDIF (GDAL_VERSION_MAJOR LESS 1 OR GDAL_VERSION_MINOR LESS 4)
101101

0 commit comments

Comments
 (0)
Please sign in to comment.