From e6527e2f73663205a0f36feac5a7feda47fba152 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 2 Mar 2021 11:19:36 +0100 Subject: [PATCH] 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. Pick-to: 6.1 Fixes: QTBUG-90449 Fixes: QTBUG-91475 Change-Id: I39f214efb18796a89f00a171ef190c547bba5c0a Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternalsExtra.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()