Skip to content

Commit b4ab101

Browse files
authored
Merge pull request #7957 from m-kuhn/noSilentDisable
Do not silently disable cmake options
2 parents 0fc16d6 + 71ec68b commit b4ab101

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

+6-2
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)