Skip to content

Commit 8b65ebd

Browse files
committedNov 28, 2014
don't build server plugins if server isn't built
1 parent 4473efe commit 8b65ebd

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed
 

‎CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@ SET (WITH_DESKTOP TRUE CACHE BOOL "Determines whether QGIS desktop should be bui
4444
SET (WITH_MAPSERVER FALSE CACHE BOOL "Determines whether QGIS mapserver should be built")
4545
IF(WITH_MAPSERVER)
4646
SET (MAPSERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS mapserver should disable ECW (ECW in server apps requires a special license)")
47-
ENDIF(WITH_MAPSERVER)
48-
49-
50-
SET (WITH_SERVER_PLUGINS TRUE CACHE BOOL "Determines whether QGIS mapserver support for python plugins should be built")
51-
IF(WITH_SERVER_PLUGINS)
52-
SET(MAPSERVER_HAVE_PYTHON_PLUGINS TRUE)
53-
ENDIF(WITH_SERVER_PLUGINS)
5447

48+
SET (WITH_SERVER_PLUGINS TRUE CACHE BOOL "Determines whether QGIS mapserver support for python plugins should be built")
49+
IF(WITH_SERVER_PLUGINS)
50+
SET(MAPSERVER_HAVE_PYTHON_PLUGINS TRUE)
51+
ENDIF(WITH_SERVER_PLUGINS)
52+
ENDIF(WITH_MAPSERVER)
5553

5654
# Custom widgets
5755
SET (WITH_CUSTOM_WIDGETS FALSE CACHE BOOL "Determines whether QGIS custom widgets for Qt Designer should be built")

‎python/CMakeLists.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,23 +166,21 @@ ADD_SIP_PYTHON_MODULE(qgis._gui gui/gui.sip qgis_core qgis_gui)
166166
SET(PY_MODULES core gui analysis networkanalysis)
167167

168168
# server module
169-
IF (WITH_SERVER_PLUGINS)
169+
IF (WITH_MAPSERVER AND WITH_SERVER_PLUGINS)
170170
INCLUDE_DIRECTORIES(
171171
../src/mapserver
172172
${CMAKE_BINARY_DIR}/src/mapserver
173173
)
174174

175-
SET(PY_MODULES ${PY_MODULES} server)
175+
SET(PY_MODULES ${PY_MODULES} server)
176176

177-
FILE(GLOB sip_files_server
177+
FILE(GLOB sip_files_server
178178
server/*.sip
179-
)
180-
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_server})
181-
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api)
182-
ADD_SIP_PYTHON_MODULE(qgis._server server/server.sip qgis_core qgis_server)
183-
184-
ENDIF (WITH_SERVER_PLUGINS)
185-
179+
)
180+
SET(SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_server})
181+
SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qgis.server.api)
182+
ADD_SIP_PYTHON_MODULE(qgis._server server/server.sip qgis_core qgis_server)
183+
ENDIF (WITH_MAPSERVER AND WITH_SERVER_PLUGINS)
186184

187185
# additional analysis includes
188186
INCLUDE_DIRECTORIES(

0 commit comments

Comments
 (0)
Please sign in to comment.