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>
This commit is contained in:
Eirik Aavitsland 2020-12-08 16:24:15 +01:00 committed by Qt Cherry-pick Bot
parent 94e7044067
commit 21bc2d91a8

View File

@ -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)