[QGIS Commit] r8202 - trunk/qgis

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Mar 10 12:05:55 EDT 2008


Author: timlinux
Date: 2008-03-10 12:05:55 -0400 (Mon, 10 Mar 2008)
New Revision: 8202

Modified:
   trunk/qgis/CMakeLists.txt
Log:
Added clauses (not enabled by default) to not build any parts of code base requiring grass or pg support.Before this change it was not possible to disable them building if you did have pg  grass on your system because when the cmake rules found them to be present it assumes you want to build with them. This may not always be the case. Note that if you disable them you have to do it explicitly before CMakeCache.txt is generated: e.g. -DWITH_GRASS=OFF -DWITH_POSTGRESQL=OFF otherwise the default behaviour is to build if those libs are present (as it was before this commit)


Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt	2008-03-10 15:57:27 UTC (rev 8201)
+++ trunk/qgis/CMakeLists.txt	2008-03-10 16:05:55 UTC (rev 8202)
@@ -25,17 +25,26 @@
 
 # try to configure and build GRASS plugin by default
 SET (WITH_GRASS TRUE CACHE BOOL "Determines whether GRASS plugin should be built")
-SET (GRASS_PREFIX "" CACHE PATH "Path to GRASS base directory")
+IF (WITH_GRASS)
+  SET (GRASS_PREFIX "" CACHE PATH "Path to GRASS base directory")
+ENDIF (WITH_GRASS)
 
+# try to configure and build POSTGRESQL support
+SET (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built")
+IF (WITH_POSTGRESQL)
+  SET (POSTGRESQL_PREFIX "" CACHE PATH "Path to POSTGRESQL base directory")
+ENDIF (WITH_POSTGRESQL)
+
 # try to configure and build python bindings by default
 SET (WITH_BINDINGS TRUE CACHE BOOL "Determines whether python bindings should be built")
+IF (WITH_BINDINGS)
+  # By default bindings will be installed only to QGIS directory
+  # Someone might want to install it to python site-packages directory
+  # as otherwise user has to use PYTHONPATH environemnt variable to add
+  # QGIS bindings to package search path
+  SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
+ENDIF (WITH_BINDINGS)
 
-# By default bindings will be installed only to QGIS directory
-# Someone might want to install it to python site-packages directory
-# as otherwise user has to use PYTHONPATH environemnt variable to add
-# QGIS bindings to package search path
-SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
-
 # Compile flag. Make it posible to turn it off.
 SET (PEDANTIC FALSE CACHE BOOL "Determines if we should compile with -Wall -Werror.")
 
@@ -76,15 +85,21 @@
 FIND_PACKAGE(GDAL)
 
 # optional
-FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
+IF (WITH_POSTGRESQL)
+  FIND_PACKAGE(Postgres) # PostgreSQL provider, SPIT plugin
+ENDIF (WITH_POSTGRESQL)
 FIND_PACKAGE(Expat)    # GPS importer plugin
 FIND_PACKAGE(GSL)      # Georeferencer
-FIND_PACKAGE(GRASS)    # GRASS plugin
+IF (WITH_GRASS)
+  FIND_PACKAGE(GRASS)    # GRASS plugin
+ENDIF (WITH_GRASS)
 
-# python support:
-# - mapserver export tool
-# - bindings
-INCLUDE (Python) # file cmake/Python.cmake
+IF (WITH_BINDINGS)
+  # python support:
+  # - mapserver export tool
+  # - bindings
+  INCLUDE (Python) # file cmake/Python.cmake
+ENDIF (WITH_BINDINGS)
 
 
 IF (NOT PROJ_FOUND OR NOT SQLITE3_FOUND OR NOT GEOS_FOUND OR NOT GDAL_FOUND)



More information about the QGIS-commit mailing list