summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-19 18:29:22 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-25 19:52:48 +0200
commit3892e86d6e22e0693f4b8225058627a09d410aac (patch)
tree6b2300c1cabeb94c3ec3dd18cb5b87e51e21807e /cmake
parentdffcc2370e43722afb25d7aec7cd9d6a36f61e03 (diff)
CMake: Don't unset Qt6Qml_FOUND when including Qml plugins
Removing the variable would cause nested find_dependency calls of FooQmlPluginDependencies.cmake files to look for the Qml package again and again. If we got to the point of including QmlPlugins.cmake, we already know that the Qml package was found. Set it to TRUE after every inclusion to avoid repeated Qml package loading. The second inclusion pass will ensure to set the found variable to FALSE in case if some dependency is actually missing. Amends aad4158959890b72afdd062614c1142c100c65b5 Pick-to: 6.4 Task-number: QTBUG-104998 Change-Id: I562a1c2ea0abac61453a743ab2e7d2f228de7ff0 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index bbdec47d82..0d0762a1b0 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -450,9 +450,9 @@ if (__qt_qml_plugins_config_file_list AND NOT QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
foreach(__qt_qml_plugin_config_file \${__qt_qml_plugins_config_file_list})
include(\${__qt_qml_plugin_config_file})
- # Temporarily unset any failure markers.
+ # Temporarily unset any failure markers and mark the Qml package as found.
unset(\${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE)
- unset(\${CMAKE_FIND_PACKAGE_NAME}_FOUND)
+ set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE)
endforeach()
# For the second round of inclusions, check and bail out early if there are errors.