diff options
author | Nicolas Fella <nicolas.fella@gmx.de> | 2022-08-01 12:41:12 +0200 |
---|---|---|
committer | Nicolas Fella <nicolas.fella@gmx.de> | 2022-08-01 13:21:14 +0200 |
commit | ee80eec19ad6cfc207b7970e2e6080ea00335d96 (patch) | |
tree | bc45f2c043fd1c84e0c42ff10d7908b5875a147b | |
parent | 491f546463df18c9d8831d803b6382bdd05d7622 (diff) | |
download | kconfig-ee80eec19ad6cfc207b7970e2e6080ea00335d96.tar.gz kconfig-ee80eec19ad6cfc207b7970e2e6080ea00335d96.tar.bz2 |
Add explicit option to disable QML support
We've had multiple people accidentally building KConfig without QML support and then complain that something down the line is breaking
To make that harder add an explict option to disable the QML stuff
-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) |