diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-03-02 11:19:36 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-30 15:14:58 +0000 |
commit | 8e5f2252ccb8a5080ad95967f19d8d4f8e6e6701 (patch) | |
tree | 4c01760d9356b6c855d8d2fb1a3048136a9b1880 /cmake | |
parent | 0c41c19a6d7a606f20236514c198acd4493d6343 (diff) |
Fix CMAKE_INSTALL_PREFIX when building against installer-provided Qt
When building a module against an installer-provided Qt,
CMAKE_INSTALL_PREFIX would default to /home/qt/work/install, which is
the install prefix of our packaging machines.
Do not hard-code the install prefix in QtBuildInternalsExtra.cmake but
use the one that is calculated from the location of
QtBuildInternalsExtra.cmake.
Fixes: QTBUG-90449
Fixes: QTBUG-91475
Change-Id: I39f214efb18796a89f00a171ef190c547bba5c0a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e6527e2f73663205a0f36feac5a7feda47fba152)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuildInternalsExtra.cmake.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in index 66f11a4364..fd91019ed7 100644 --- a/cmake/QtBuildInternalsExtra.cmake.in +++ b/cmake/QtBuildInternalsExtra.cmake.in @@ -22,7 +22,7 @@ get_filename_component(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX # different installation prefix than the original one. Also allow to opt out via a special variable. if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" CACHE PATH + set(CMAKE_INSTALL_PREFIX "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE) endif() |