summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-01-19 17:17:40 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-01-19 20:59:29 +0100
commitbd8d74e0e265297d61fe3b42f71a282bf381c379 (patch)
tree3477fc599b117501f9d6b1dd646dd9c09dd69435 /cmake
parent45dc973d9627fd60c2e567450e06105dc63121bf (diff)
Fix framework path for *_header_check targets
When building a Qt module against an installer-provided Qt on macOS, the module pulls in the headersclean feature that creates the *_header_check targets. Those targets try to compile the public headers of the module, and the compilation command contains the -iframework argument. That -iframework argument is supposed to point to the directory where the Qt libs are installed. However, it pointed to the original CMAKE_INSTALL_PREFIX of the machine where Qt was packaged. Use the QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX variable instead that contains the real installation location, even for an installer-provided Qt. Pick-to: 6.0 Fixes: QTBUG-90402 Change-Id: I27de8b3cc816488c2716042383b334d5c421452d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtHeadersClean.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake
index e9cd956d2e..9cb11dddd1 100644
--- a/cmake/QtHeadersClean.cmake
+++ b/cmake/QtHeadersClean.cmake
@@ -157,7 +157,7 @@ function(qt_internal_add_headers_clean_target
# For some reason CMake doesn't generate -iframework flags from the INCLUDE_DIRECTORIES
# generator expression we provide, so pass it explicitly and hope for the best.
list(APPEND framework_includes
- "-iframework" "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}")
+ "-iframework" "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_LIBDIR}")
endif()
foreach(header ${hclean_headers})