Skip to content

Commit

Permalink
Added clauses (not enabled by default) to not build any parts of code…
Browse files Browse the repository at this point in the history
… 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)

git-svn-id: http://svn.osgeo.org/qgis/trunk@8202 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 10, 2008
1 parent 279cc6f commit 7e2bfcf
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,25 @@ SET (PLUGINS_ALSO_BINARIES FALSE)

# 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")

# 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)")
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)

# Compile flag. Make it posible to turn it off.
SET (PEDANTIC FALSE CACHE BOOL "Determines if we should compile with -Wall -Werror.")
Expand Down Expand Up @@ -76,15 +85,21 @@ FIND_PACKAGE(GEOS)
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

# python support:
# - mapserver export tool
# - bindings
INCLUDE (Python) # file cmake/Python.cmake
IF (WITH_GRASS)
FIND_PACKAGE(GRASS) # GRASS plugin
ENDIF (WITH_GRASS)

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)
Expand Down

0 comments on commit 7e2bfcf

Please sign in to comment.