diff --git a/CMakeLists.txt b/CMakeLists.txt index a9e69a3da..519ee1abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,8 @@ option( WITH_KF5DBus "Use DBus service for unique-application." OFF ) # When adding WITH_* that affects the ABI offered by libcalamares, # also update libcalamares/CalamaresConfig.h.in option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON ) -option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF ) +option( WITH_PYTHONQT "Enable Python view modules API (deprecated, requires PythonQt)." OFF ) +option( WITH_QML "Enable QML UI options." ON ) # Possible debugging flags are: # - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone @@ -253,7 +254,10 @@ include( CMakeColors ) ### DEPENDENCIES # -find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) +find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui LinguistTools Network Svg Widgets ) +if( WITH_QML ) + find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets ) +endif() if( Qt5_VERSION VERSION_GREATER 5.12.1 ) # At least Qt 5.12.2 seems to support Esperanto in QLocale if( "eo" IN_LIST _tx_incomplete ) diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index 55468cf15..b31de95b5 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -11,5 +11,6 @@ //cmakedefines for CMake variables (e.g. for optdepends) go here #cmakedefine WITH_PYTHON #cmakedefine WITH_PYTHONQT +#cmakedefine WITH_QML #endif // CALAMARESCONFIG_H diff --git a/src/modules/keyboardq/CMakeLists.txt b/src/modules/keyboardq/CMakeLists.txt index f5fd2b64b..729748a7f 100644 --- a/src/modules/keyboardq/CMakeLists.txt +++ b/src/modules/keyboardq/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "keyboardq (QML is not supported in this build)" ) + return() +endif() + set( _keyboard ${CMAKE_CURRENT_SOURCE_DIR}/../keyboard ) include_directories( ${_keyboard} ) diff --git a/src/modules/localeq/CMakeLists.txt b/src/modules/localeq/CMakeLists.txt index 280c95c62..c9ed1cd55 100644 --- a/src/modules/localeq/CMakeLists.txt +++ b/src/modules/localeq/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "localeq (QML is not supported in this build)" ) + return() +endif() + # When debugging the timezone widget, add this debugging definition # to have a debugging-friendly timezone widget, debug logging, # and no intrusive timezone-setting while clicking around. diff --git a/src/modules/notesqml/CMakeLists.txt b/src/modules/notesqml/CMakeLists.txt index 6aedab5aa..7ac808fa7 100644 --- a/src/modules/notesqml/CMakeLists.txt +++ b/src/modules/notesqml/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "notesqml (QML is not supported in this build)" ) + return() +endif() + calamares_add_plugin( notesqml TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/welcomeq/CMakeLists.txt b/src/modules/welcomeq/CMakeLists.txt index 9cb89c3d9..4a040344e 100644 --- a/src/modules/welcomeq/CMakeLists.txt +++ b/src/modules/welcomeq/CMakeLists.txt @@ -1,6 +1,11 @@ # This is a re-write of the welcome module using QML view steps # instead of widgets. +if( NOT WITH_QML ) + calamares_skip_module( "welcomeq (QML is not supported in this build)" ) + return() +endif() + set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome ) include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} )