From cf41541c402fdec1cedf93b2318dac4b699e32af Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 11 Jul 2023 14:17:51 +0200 Subject: [PATCH] CMake: Fix error in qt_generate_deploy_app_script ...when using a Qt cross-built for embedded Linux and NO_UNSUPPORTED_PLATFORM_ERROR set. Attempting to install such a project will now give the following output: -- Skipping runtime deployment steps. Support for installing runtime dependencies is not implemented for this target platform (Linux, shared Qt libs, cross-compiled). Fixes: QTBUG-114069 Change-Id: Idd2af2135d2ca3cc0e5eeafb7701e891f8a0cc25 Reviewed-by: Alexandru Croitor (cherry picked from commit 7c82a49e6fc4ec606cffa4fa8d3ceb42c87439cd) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/Qt6CoreMacros.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index d50ec5257ac..7d6608faef3 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -3005,6 +3005,10 @@ function(qt6_generate_deploy_app_script) set(qt_build_type_string "static Qt libs") endif() + if(CMAKE_CROSSCOMPILING) + string(APPEND qt_build_type_string ", cross-compiled") + endif() + set(generate_args TARGET ${arg_TARGET} OUTPUT_SCRIPT deploy_script @@ -3050,7 +3054,8 @@ qt6_deploy_runtime_dependencies( ${common_deploy_args}) ") - elseif(UNIX AND NOT APPLE AND NOT ANDROID AND QT6_IS_SHARED_LIBS_BUILD) + elseif(UNIX AND NOT APPLE AND NOT ANDROID AND QT6_IS_SHARED_LIBS_BUILD + AND NOT CMAKE_CROSSCOMPILING) qt6_generate_deploy_script(${generate_args} CONTENT " qt6_deploy_runtime_dependencies(