From 2305656a4e79123a276466028deb0a40520f79c8 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 17 Feb 2022 15:03:21 +0100 Subject: [PATCH] CMake: Clean up qt_generate_deploy_app_script for 6.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mention in the docs that qt_generate_deploy_app_script does not currently support cross-build scenarios. Use the value of QT_DEPLOY_BIN_DIR instead of CMAKE_INSTALL_PREFIX in the qt_deploy_runtime_dependencies call done by qt6_generate_deploy_app_script. This matches what we say to do in the documentation of qt_deploy_runtime_dependencies. Pick-to: 6.3 Task-number: QTBUG-98545 Fixes: QTBUG-100921 Change-Id: Ie9bfddeaf503d3efe7a73b2e4148bbf0601d693e Reviewed-by: Jörg Bornemann --- src/corelib/Qt6CoreMacros.cmake | 2 +- .../doc/src/cmake/qt_generate_deploy_app_script.qdoc | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index ea7f0bcda1..3b1e8a83e1 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -2708,7 +2708,7 @@ qt_deploy_runtime_dependencies( file(GENERATE OUTPUT "${file_name}" CONTENT " include(${QT_DEPLOY_SUPPORT}) qt_deploy_runtime_dependencies( - EXECUTABLE ${CMAKE_INSTALL_BINDIR}/$ + EXECUTABLE \${QT_DEPLOY_BIN_DIR}/$ GENERATE_QT_CONF )") diff --git a/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc b/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc index 4aa6213525..cbf100358a 100644 --- a/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc +++ b/src/corelib/doc/src/cmake/qt_generate_deploy_app_script.qdoc @@ -71,9 +71,12 @@ which should come after the application's target has been installed using \l{install(TARGETS)}. The deployment script will call \l{qt_deploy_runtime_dependencies()} with a -suitable set of options for the standard install layout. This is currently only -implemented for macOS app bundles and Windows targets. -Calling \c{qt_generate_deploy_app_script()} for any other platform will result +suitable set of options for the standard install layout. +Currently, this is only implemented for macOS app bundles built on a macOS +host and Windows executables built on a Windows host. +Cross-building a Windows executable on a Linux host, as well as similar +scenarios, are not currently supported. +Calling \c{qt_generate_deploy_app_script()} in such a case will result in a fatal error, unless the \c{NO_UNSUPPORTED_PLATFORM_ERROR} option is given. For deploying a QML application, use