[QGIS Commit] r10562 - trunk/qgis/cmake

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Apr 14 08:54:08 EDT 2009


Author: wonder
Date: 2009-04-14 08:54:07 -0400 (Tue, 14 Apr 2009)
New Revision: 10562

Modified:
   trunk/qgis/cmake/FindGEOS.cmake
Log:
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.


Modified: trunk/qgis/cmake/FindGEOS.cmake
===================================================================
--- trunk/qgis/cmake/FindGEOS.cmake	2009-04-14 09:03:52 UTC (rev 10561)
+++ trunk/qgis/cmake/FindGEOS.cmake	2009-04-14 12:54:07 UTC (rev 10562)
@@ -53,7 +53,18 @@
       )
     #MESSAGE("DBG GEOS_CONFIG ${GEOS_CONFIG}")
 
-    IF (GEOS_CONFIG) 
+    IF (GEOS_CONFIG)
+      
+      EXEC_PROGRAM(${GEOS_CONFIG}
+        ARGS --version
+        OUTPUT_VARIABLE GEOS_VERSION)
+      STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" GEOS_VERSION_MAJOR "${GEOS_VERSION}")
+      STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" GEOS_VERSION_MINOR "${GEOS_VERSION}")
+
+      IF (GEOS_VERSION_MAJOR LESS 3)
+          MESSAGE (FATAL_ERROR "GEOS version is too old (${GEOS_VERSION}). Use 3.0.0 or higher.")
+      ENDIF (GEOS_VERSION_MAJOR LESS 3)
+     
       # set INCLUDE_DIR to prefix+include
       EXEC_PROGRAM(${GEOS_CONFIG}
         ARGS --prefix



More information about the QGIS-commit mailing list