diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-05-15 16:55:16 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-05-16 13:50:52 +0200 |
commit | 4416a6bd4fb1cd1cb9d9225f3183431b37d6c948 (patch) | |
tree | 782d6a6c08f5f4c2ee13569176d3ec6c5be5d887 /tests/auto/cmake/qmlquery/CMakeLists.txt | |
parent | c2ae0350a741cb49879a15e23f178c7e392e1710 (diff) | |
download | qtdeclarative-4416a6bd4fb1cd1cb9d9225f3183431b37d6c948.tar.gz |
qt_add_qml_module: Set QT_QML_MODULE_QML_FILES correctly
A QML module might not actually contain any QML files at all (in case of
a pure C++ module). In such a case, we so far ended up with
QT_QML_MODULE_QML_FILES being set to "-NOTOUND", which later is
problematic for qt_query_qml_module.
We already have code in place to cover that issue for some variables,
just not for QML_FILES. The code is now amended to handle it, too.
Moreover, the code block is moved to the end of the function. This
ensures that the code for setting a variable always comes before the
code ensuring that it is set – which would not have been the case for
QML_FILES if it had stayed at its old position.
Pick-to: 6.5
Task-number: QTBUG-111946
Change-Id: Ib4501bb4a617b2174ad89e116588aa51353cb17f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/cmake/qmlquery/CMakeLists.txt')
-rw-r--r-- | tests/auto/cmake/qmlquery/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/cmake/qmlquery/CMakeLists.txt b/tests/auto/cmake/qmlquery/CMakeLists.txt index 5baac4f967..bafabe70f2 100644 --- a/tests/auto/cmake/qmlquery/CMakeLists.txt +++ b/tests/auto/cmake/qmlquery/CMakeLists.txt @@ -8,3 +8,4 @@ find_package(Qt6 REQUIRED COMPONENTS Qml) set(CMAKE_AUTOMOC TRUE) add_subdirectory(My/Things) +add_subdirectory(My/OtherThings) |