diff options
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 214b7423..7df1191e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,12 @@ option(KCONFIG_USE_GUI "Build components using Qt${QT_MAJOR_VERSION}Gui" ON) if(KCONFIG_USE_GUI) find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui) endif() -find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} OPTIONAL_COMPONENTS Qml) + +option(KCONFIG_USE_QML "Build components using Qt${QT_MAJOR_VERSION}Qml" ON) + +if(KCONFIG_USE_QML) + find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Qml) +endif() if (NOT ANDROID) set(default_kconfig_use_dbus ON) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 715890e0..2e05c615 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ add_subdirectory(core) if(TARGET Qt${QT_MAJOR_VERSION}::Gui) add_subdirectory(gui) endif() -if(TARGET Qt${QT_MAJOR_VERSION}::Qml) +if(KCONFIG_USE_QML) add_subdirectory(qml) endif() add_subdirectory(kconfig_compiler) |