Allow enabling GUI config even when no specific sources present

Useful when GUI specific code is only wrapped using #ifdef so
there are no extra files.
This commit is contained in:
Martchus 2018-06-24 20:47:19 +02:00
parent 79679c0f42
commit 3a6bbb0115
1 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ endif()
list(APPEND META_ADDITIONAL_STATIC_LINK_FLAGS -static-libstdc++ -static-libgcc)
# options for enabling/disabling Qt GUI (if available)
if(WIDGETS_HEADER_FILES OR WIDGETS_SRC_FILES OR WIDGETS_UI_FILES)
if(WIDGETS_HEADER_FILES OR WIDGETS_SRC_FILES OR WIDGETS_UI_FILES OR META_HAS_WIDGETS_GUI)
if(META_GUI_OPTIONAL)
option(WIDGETS_GUI "enables/disables building the Qt Widgets GUI: yes (default) or no" ON)
else()
@ -191,7 +191,7 @@ if(WIDGETS_HEADER_FILES OR WIDGETS_SRC_FILES OR WIDGETS_UI_FILES)
else()
set(WIDGETS_GUI OFF)
endif()
if(QML_HEADER_FILES OR QML_SRC_FILES)
if(QML_HEADER_FILES OR QML_SRC_FILES OR META_HAS_QUICK_GUI)
if(META_GUI_OPTIONAL)
option(QUICK_GUI "enables/disables building the Qt Quick GUI: yes (default) or no" ON)
else()