summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2020-11-23 14:15:04 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2020-11-24 20:51:41 +0000
commit7f1e145f7ee885d8c6b29d02206711040b65f6f6 (patch)
tree84193b7f4b41d7b0e6fb3d3b8c3a6700eee3b8fe /cmake
parent0274daf30779ba08fc708247a3e645fd44980280 (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 Pick-to: 6.0 Change-Id: I655c60847f2ab872948cfe9aedc27835e5cc4fb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtWrapperScriptHelpers.cmake15
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")