aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlDeploySupport.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-02-09 17:46:45 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-15 10:06:13 +0000
commitfca336463ae3e87590d8957d7f43e960d7291761 (patch)
tree9e00cbedb20821f341bb075a9cde866b86cc7928 /src/qml/Qt6QmlDeploySupport.cmake
parent116ba6f3846569359450424b66f8786ec00ed7cd (diff)
CMake: Error out when using CMake < 3.19 with qml app deployment
App qml deployment fails at install time when using CMake < 3.19 because the _qt_internal_generate_deploy_qml_imports_script finalizer is not executed. It is not executed because the Qml dependency is added later than qt_add_executable, and qt_add_executable immediately finalizes with a lower CMake version. We can detect this situation and issue a warning to the user that they should manually finalize their target in that case. Adjust documentation to mention that. Task-number: QTBUG-98545 Change-Id: I862b2fad35c8128dbb043cea972c8e36958308f4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 0d276381135ed5724464cb784f3d17775ac4d764) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/Qt6QmlDeploySupport.cmake')
-rw-r--r--src/qml/Qt6QmlDeploySupport.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/Qt6QmlDeploySupport.cmake b/src/qml/Qt6QmlDeploySupport.cmake
index 58ca93b5fa..dc16261170 100644
--- a/src/qml/Qt6QmlDeploySupport.cmake
+++ b/src/qml/Qt6QmlDeploySupport.cmake
@@ -50,7 +50,9 @@ function(qt_deploy_qml_imports)
message(FATAL_ERROR
"No QML imports information recorded for target ${arg_TARGET}. "
"The target must be an executable and qt_add_qml_module() must "
- "have been called with it. Missing file:\n ${filename}"
+ "have been called with it. If using a CMake version lower than 3.19, ensure "
+ "that the executable is manually finalized with qt_finalize_target(). "
+ "Missing file:\n ${filename}"
)
endif()
include(${filename})