Browse Source

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.
consistent_macro_prefix
Martchus 4 years ago
parent
commit
3a6bbb0115
  1. 4
      cmake/modules/BasicConfig.cmake

4
cmake/modules/BasicConfig.cmake

@ -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()

Loading…
Cancel
Save