Skip to content

Commit 71ec68b

Browse files
committedSep 19, 2018
Do not silently disable cmake options
1 parent 0fc16d6 commit 71ec68b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ IF(WITH_CORE)
108108
IF (NOT WITH_GUI)
109109
SET (HAVE_GUI FALSE) # used in qgsconfig.h
110110
# force value of some options
111-
SET(WITH_DESKTOP FALSE)
112-
SET(WITH_CUSTOM_WIDGETS FALSE)
111+
IF(WITH_DESKTOP)
112+
MESSAGE(FATAL_ERROR "Desktop cannot be built without gui. Enable WITH_GUI or disable WITH_DESKTOP.")
113+
ENDIF(WITH_DESKTOP)
114+
IF(WITH_CUSTOM_WIDGETS)
115+
MESSAGE(FATAL_ERROR "Custom widgets cannot be built without gui. Enable WITH_GUI or disable WITH_CUSTOM_WIDGETS.")
116+
ENDIF(WITH_CUSTOM_WIDGETS)
113117
ELSE ()
114118
SET (HAVE_GUI TRUE) # used in qgsconfig.h
115119
ENDIF()

0 commit comments

Comments
 (0)
Please sign in to comment.