diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-01-11 13:26:54 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-01-18 00:20:37 +0100 |
commit | 037fd545c485e73ac68377a264c84208592dc74f (patch) | |
tree | 526afe1d8023eccf6f31edf136d0bfe964882850 /cmake/QtPostProcessHelpers.cmake | |
parent | e52d50a03da29e2dddaee551e4409f28c7ed56f2 (diff) |
CMake: Propagate qtbase's CMAKE_STAGING_PREFIX to Qt modules
When qtbase is configured with CMAKE_STAGING_PREFIX set, then Qt modules
built against this qtbase should also get CMAKE_STAGING_PREFIX by
default. Like CMAKE_INSTALL_PREFIX in regular builds, this prefix will
be determined by the location of QtBuildInternalsExtra.cmake to support
building Qt modules against an installer-provided Qt.
CMAKE_INSTALL_PREFIX on the other hand must be exactly the value that
was provided when building qtbase.
If CMAKE_STAGING_PREFIX is specified by the user, honor it.
To opt out of automatically setting CMAKE_STAGING_PREFIX, set
QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX to ON.
Remove the old code that was supposed to set CMAKE_STAGING_PREFIX.
Pick-to: 6.2 6.3
Fixes: QTBUG-99666
Change-Id: I20edef54c102ca9784fcdef0decf0bd83266ae11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPostProcessHelpers.cmake')
-rw-r--r-- | cmake/QtPostProcessHelpers.cmake | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 35ca6eabee..a9b295a9d6 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -659,18 +659,6 @@ 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}") |