Skip to content

Commit

Permalink
don't build server plugins if server isn't built
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 28, 2014
1 parent 4473efe commit 8b65ebd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ SET (WITH_DESKTOP TRUE CACHE BOOL "Determines whether QGIS desktop should be bui
SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should be built")
IF(WITH_MAPSERVER)
SET (MAPSERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS mapserver should disable ECW (ECW in server apps requires a special license)")
ENDIF(WITH_MAPSERVER)


SET (WITH_SERVER_PLUGINS TRUE CACHE BOOL "Determines whether QGIS mapserver support for python plugins should be built")
IF(WITH_SERVER_PLUGINS)
SET(MAPSERVER_HAVE_PYTHON_PLUGINS TRUE)
ENDIF(WITH_SERVER_PLUGINS)

SET (WITH_SERVER_PLUGINS TRUE CACHE BOOL "Determines whether QGIS mapserver support for python plugins should be built")
IF(WITH_SERVER_PLUGINS)
SET(MAPSERVER_HAVE_PYTHON_PLUGINS TRUE)
ENDIF(WITH_SERVER_PLUGINS)
ENDIF(WITH_MAPSERVER)

# Custom widgets
SET (WITH_CUSTOM_WIDGETS FALSE CACHE BOOL "Determines whether QGIS custom widgets for Qt Designer should be built")
Expand Down
18 changes: 8 additions & 10 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,21 @@ ADD_SIP_PYTHON_MODULE(qgis._gui gui/gui.sip qgis_core qgis_gui)
SET(PY_MODULES core gui analysis networkanalysis)

# server module
IF (WITH_SERVER_PLUGINS)
IF (WITH_MAPSERVER AND WITH_SERVER_PLUGINS)
INCLUDE_DIRECTORIES(
../src/mapserver
${CMAKE_BINARY_DIR}/src/mapserver
)

SET(PY_MODULES ${PY_MODULES} server)
SET(PY_MODULES ${PY_MODULES} server)

FILE(GLOB sip_files_server
FILE(GLOB sip_files_server
server/*.sip
)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_server})
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api)
ADD_SIP_PYTHON_MODULE(qgis._server server/server.sip qgis_core qgis_server)

ENDIF (WITH_SERVER_PLUGINS)

)
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_server})
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api)
ADD_SIP_PYTHON_MODULE(qgis._server server/server.sip qgis_core qgis_server)
ENDIF (WITH_MAPSERVER AND WITH_SERVER_PLUGINS)

# additional analysis includes
INCLUDE_DIRECTORIES(
Expand Down

0 comments on commit 8b65ebd

Please sign in to comment.