summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2020-12-08 16:24:15 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2020-12-08 16:36:50 +0100
commite26d2865a718cecd08233e84673c67c5ca3bc765 (patch)
tree491be7b5d2692c684a9c214c6b671a8504ef0f4b /cmake
parentc0ebfb81de8fbd352b5a63973f5dde978599c08c (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 Pick-to: 6.0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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)