summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-27 20:38:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-29 08:45:11 +0000
commitcd0b711017330146110baee4bd80ac61a1bd55cf (patch)
treea819119fdf5696e3cdf73353b8fe49881884b959 /cmake
parent85ababa213bd03c455306c9af8561e52a77e5a27 (diff)
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 <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit acde9784cada212ac23efd7027dc7091a45f9abd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtQmakeHelpers.cmake4
1 files changed, 3 insertions, 1 deletions
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