summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcess.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-07-13 09:22:46 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-07-13 14:56:49 +0200
commitce9efcf4a901fbb245fc7a9a6605b8c8fc25e91d (patch)
tree4c16ae4cc1edc552e7db30163d9fcca69daf0f44 /cmake/QtPostProcess.cmake
parent004d3fab49d90367a070c0ecbd0fda11930ccd22 (diff)
CMake: Fix QT_STAGING_PREFIX for repos other than qtbase
For repositories other than qtbase the QT_STAGING_PREFIX was empty, because it was only determined in qtbase. Also, we save the CMAKE_STAGING_PREFIX in the Qt6BuildInternals package and set this variable if it's not explicitly set by the user. As with CMAKE_INSTALL_PREFIX this behavior can be prevented by defining QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX=ON. Change-Id: I73100abbef24f5d3fb8f82029d0374176edc8048 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPostProcess.cmake')
-rw-r--r--cmake/QtPostProcess.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index 73d9d2dcd6..b6cbe57d41 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -459,6 +459,18 @@ endif()\n")
"set(OPENSSL_ROOT_DIR \"${openssl_root_cmake_path}\" CACHE STRING \"\")\n")
endif()
+ if(NOT "${CMAKE_STAGING_PREFIX}" STREQUAL "")
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS
+ "
+# If no explicit CMAKE_STAGING_PREFIX is provided, force set the original Qt staging prefix,
+if(\"$\{CMAKE_STAGING_PREFIX}\" STREQUAL \"\"
+ AND NOT QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX)
+ set(CMAKE_STAGING_PREFIX \"${CMAKE_STAGING_PREFIX}\" CACHE PATH
+ \"Staging path prefix, prepended onto install directories on the host machine.\" FORCE)
+endif()
+")
+ endif()
+
qt_generate_install_prefixes(install_prefix_content)
string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}")