diff options
-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") |