diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2020-11-23 14:15:04 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-24 23:49:00 +0000 |
commit | e0cb10e4be59fe4ec16156da7ca7d5c47237084d (patch) | |
tree | 5f0b4bbc944484f38c4f4ce6c61ed81c0483b4d7 /cmake | |
parent | 5e2fd2fcd4f949bf4c4d6c4d9858f18b006871c8 (diff) |
CMake: Restore QT_STAGING_PREFIX in qt-cmake-standalone-test generation
Restore 'QT_STAGING_PREFIX' logic when generating
'qt-cmake-standalone-test'. Relative paths now calculating depend on
'QT_STAGING_PREFIX'. For prefix builds QT_STAGING_PREFIX should be
prepend to '__qt_cmake_standalone_test_path'
Fixes: QTBUG-88764
Change-Id: I655c60847f2ab872948cfe9aedc27835e5cc4fb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7f1e145f7ee885d8c6b29d02206711040b65f6f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtWrapperScriptHelpers.cmake | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cmake/QtWrapperScriptHelpers.cmake b/cmake/QtWrapperScriptHelpers.cmake index b1ae09262c..63cb770131 100644 --- a/cmake/QtWrapperScriptHelpers.cmake +++ b/cmake/QtWrapperScriptHelpers.cmake @@ -70,17 +70,26 @@ function(qt_internal_create_wrapper_scripts) set(__qt_cmake_standalone_test_bin_name "qt-cmake-standalone-test") set(__qt_cmake_standalone_test_bin_path "${INSTALL_BINDIR}/${__qt_cmake_standalone_test_bin_name}") + set(__qt_cmake_private_path + "${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/qt-cmake-private") set(__qt_cmake_standalone_test_path "${__build_internals_install_dir}/${__build_internals_standalone_test_template_dir}") get_filename_component(rel_base_path - "${CMAKE_INSTALL_PREFIX}/${__qt_cmake_standalone_test_bin_path}" + "${QT_STAGING_PREFIX}/${__qt_cmake_standalone_test_bin_path}" DIRECTORY) + if(QT_WILL_INSTALL) + # Need to prepend the staging prefix when doing prefix builds, because the build internals + # install dir is relative in that case.. + qt_path_join(__qt_cmake_standalone_test_path + "${QT_STAGING_PREFIX}" + "${__qt_cmake_standalone_test_path}") + endif() file(RELATIVE_PATH __qt_cmake_private_relpath "${rel_base_path}" - "${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR}/qt-cmake-private") + "${__qt_cmake_private_path}") file(RELATIVE_PATH __qt_cmake_standalone_test_relpath "${rel_base_path}" - "${CMAKE_INSTALL_PREFIX}/${__qt_cmake_standalone_test_path}") + "${__qt_cmake_standalone_test_path}") if(CMAKE_HOST_UNIX) set(__qt_cmake_standalone_test_os_prelude "#!/bin/sh") |