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 Task-number: QTBUG-104998 Change-Id: I562a1c2ea0abac61453a743ab2e7d2f228de7ff0 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 3892e86d6e22e0693f4b8225058627a09d410aac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
77d1b03612
commit
12b08d1802
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user