diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-07-02 13:53:31 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-07-09 08:55:27 +0200 |
commit | acf6ef536f3b84ff7bdce702d0d592201344e339 (patch) | |
tree | 4ba6539d1dc3987591decf61d229fd86cd521411 /cmake/QtBuild.cmake | |
parent | f4e4ad6d2bfc71d93698b2bd81fcbab6ee46d918 (diff) |
CMake: Introduce QT_STAGING_PREFIX
Add the cache variable QT_STAGING_PREFIX that is the same as
CMAKE_STAGING_PREFIX - if it's set, or CMAKE_INSTALL_PREFIX otherwise.
Use the variable in the places where we check for the emptiness of
CMAKE_STAGING_PREFIX to use CMAKE_INSTALL_PREFIX.
Change-Id: I372d57dfa41818c1965b824c59ab3cac80b38f60
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 2fc9a9d060..f2418303c6 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -162,11 +162,7 @@ function(qt_internal_set_up_global_paths) else() # When doing a non-prefix build, both the build dir and install dir are the same, # pointing to the qtbase build dir. - if("${CMAKE_STAGING_PREFIX}" STREQUAL "") - set(QT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}") - else() - set(QT_BUILD_DIR "${CMAKE_STAGING_PREFIX}") - endif() + set(QT_BUILD_DIR "${QT_STAGING_PREFIX}") set(QT_INSTALL_DIR "${QT_BUILD_DIR}") endif() endif() @@ -1399,11 +1395,7 @@ function(qt_generate_qmake_wrapper_for_target) qt_path_join(qt_conf_path "${INSTALL_BINDIR}" "target_qt.conf") set(prefix "${CMAKE_INSTALL_PREFIX}") - set(ext_prefix "${CMAKE_STAGING_PREFIX}") - if(ext_prefix STREQUAL "") - set(ext_prefix "${prefix}") - endif() - + set(ext_prefix "${QT_STAGING_PREFIX}") set(host_prefix "${QT_HOST_PATH}") file(RELATIVE_PATH host_prefix_relative_to_conf_file "${ext_prefix}/${INSTALL_BINDIR}" "${host_prefix}") |