Skip to content

Commit e3ce304

Browse files
author
wonder
committed
For 1.1 release we need geos 3.0.0 or later so make sure the user has it.
GEOS 3 is required by PAL, simplify method of QgsGeometry and probably also spatialite. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10562 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7475b26 commit e3ce304

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cmake/FindGEOS.cmake

+12-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,18 @@ ELSE(WIN32)
5353
)
5454
#MESSAGE("DBG GEOS_CONFIG ${GEOS_CONFIG}")
5555

56-
IF (GEOS_CONFIG)
56+
IF (GEOS_CONFIG)
57+
58+
EXEC_PROGRAM(${GEOS_CONFIG}
59+
ARGS --version
60+
OUTPUT_VARIABLE GEOS_VERSION)
61+
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}")
62+
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}")
63+
64+
IF (GEOS_VERSION_MAJOR LESS 3)
65+
MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.0.0 or higher.")
66+
ENDIF (GEOS_VERSION_MAJOR LESS 3)
67+
5768
# set INCLUDE_DIR to prefix+include
5869
EXEC_PROGRAM(${GEOS_CONFIG}
5970
ARGS --prefix

0 commit comments

Comments
 (0)