From cd0b711017330146110baee4bd80ac61a1bd55cf Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 27 Sep 2021 20:38:48 +0200 Subject: 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. Fixes: QTBUG-96906 Change-Id: I1390e952e544e57d5dd3bc09d688a612db9b4247 Reviewed-by: Qt CI Bot Reviewed-by: Alexandru Croitor (cherry picked from commit acde9784cada212ac23efd7027dc7091a45f9abd) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtQmakeHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmake') 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 -- cgit v1.2.3