summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2020-12-08 16:24:15 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-17 08:31:38 +0000
commit21bc2d91a8057f3aaf3cc62c37fd1597347072f2 (patch)
tree02421354c13adb2e77d19ffedc6fdeda72213385 /cmake
parent94e7044067acfbb4b08b56ca6eef5fccd5f942f6 (diff)
Fix autotest config in cross-compiled prefix build
qt-cmake-standalone-test would be looking for the config files under the target machine install prefix instead of under the staging prefix on the build host. Change-Id: I29850af6d8fe502f4944f689ec10539d17ccdcb9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e26d2865a718cecd08233e84673c67c5ca3bc765) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 53c70533fb..477f5d21e9 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -421,7 +421,11 @@ function(qt_get_standalone_tests_confg_files_path out_var)
# QT_CONFIG_INSTALL_DIR is relative in prefix builds.
if(QT_WILL_INSTALL)
- qt_path_join(path "${CMAKE_INSTALL_PREFIX}" "${path}")
+ if(DEFINED CMAKE_STAGING_PREFIX)
+ qt_path_join(path "${CMAKE_STAGING_PREFIX}" "${path}")
+ else()
+ qt_path_join(path "${CMAKE_INSTALL_PREFIX}" "${path}")
+ endif()
endif()
set("${out_var}" "${path}" PARENT_SCOPE)