summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-09-10 17:45:45 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-09-11 19:49:50 +0200
commit9a2ee310596d229e334b40c4cc37a253009cabf3 (patch)
treebdd9db4f3e95b35981d0dd965b849471171062e9 /cmake/QtBuild.cmake
parent9346760f5a173bd3b697b8f800b3c992db1019bd (diff)
CMake: Fix rpaths set for Qt internal apps like Designer
qt_apply_rpaths takes into account properties like MACOSX_BUNDLE. This property might not yet be set when qt_internal_add_app is called, but later. To handle that, move the call of qt_apply_rpaths to qt_internal_finalize_app. As a result, the installed apps will have 2 rpaths, the $ORIGIN style relocatable one, and an absolute path one pointing to the Qt prefix/lib. The last one might be unnecessary. Fixes: QTBUG-86514 Change-Id: I25e0d695c78c8b5703e94c99cc2457f772721456 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 27fe8d4226..92b4e7e400 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -247,6 +247,15 @@ set(CMAKE_INSTALL_RPATH "" CACHE STRING "RPATH for installed binaries")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
+#
+# TODO: Do we really want to use this option for official packages? Perhaps make it configurable
+# or remove it? This causes final installed binaries to contain an absolute path RPATH pointing
+# to ${CMAKE_INSTALL_PREFIX}/lib, which on the CI would be something like
+# /Users/qt/work/install/lib.
+# It doesn't seem necessary to me, given that qt_apply_rpaths already applies $ORIGIN-style
+# relocatable paths, but maybe i'm missing something, because the original commit that added the
+# option mentions it's needed in some cross-compilation scenario for program binaries that
+# link against QtCore.
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
function(qt_setup_tool_path_command)