From acde9784cada212ac23efd7027dc7091a45f9abd Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 27 Sep 2021 20:38:48 +0200 Subject: [PATCH] CMake: Only write device prefix to target_qt.conf if necessary The device prefix in target_qt.conf is necessary if and only if the prefix on the host is different from the prefix on the device - in CMake terms: if CMAKE_STAGING_PREFIX is different from CMAKE_INSTALL_PREFIX. This removes the [Devices] section from target_qt.conf from our iOS and Android packages, because we don't set CMAKE_STAGING_PREFIX for those platforms. Pick-to: 6.2 Fixes: QTBUG-96906 Change-Id: I1390e952e544e57d5dd3bc09d688a612db9b4247 Reviewed-by: Qt CI Bot Reviewed-by: Alexandru Croitor --- cmake/QtQmakeHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake index 409c8a6cc8..7c5d21ce78 100644 --- a/cmake/QtQmakeHelpers.cmake +++ b/cmake/QtQmakeHelpers.cmake @@ -122,9 +122,11 @@ function(qt_generate_qmake_wrapper_for_target) set(sysrootify_prefix true) else() set(sysrootify_prefix false) - string(APPEND content "[DevicePaths] + if(NOT ext_prefix STREQUAL prefix) + string(APPEND content "[DevicePaths] Prefix=${prefix} ") + endif() endif() string(APPEND content