diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-09-15 23:02:33 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-09-17 07:20:29 +0200 |
commit | 310db2b8164fd2a8d9bed4bbf46faa674ff553cc (patch) | |
tree | 9a390394b8ae4f9147c42c061362b1d189dbd9da | |
parent | 9d319982178a13d7c4195a6bc383b2f58c9f8468 (diff) |
Fix rpaths on mac framework builds
In case of framework builds webengine process needs
LC_RPATH with @loader_path or @executable_path which resolves
to the absolute path of the webengine process executable so
correct value is @loader_path/../../../../../../../
Do not try to resolve relative path in qtbase because for some
reason it can give different result on different build setups
use fixed INSTALL_RPATH property.
Fixes: QTBUG-96539
Pick-to: 6.2 dev
Change-Id: I6e8f8c15ac40c261a4f5e3c6b9ed8b4c168a38ec
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | src/process/CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt index e5b3759b8..a520ee712 100644 --- a/src/process/CMakeLists.txt +++ b/src/process/CMakeLists.txt @@ -52,10 +52,12 @@ if(QT_FEATURE_debug_and_release) OUTPUT_NAME_DEBUG ${qtWebEngineProcessName}${CMAKE_DEBUG_POSTFIX}) endif() -qt_apply_rpaths(TARGET ${qtWebEngineProcessName} INSTALL_PATH "${INSTALL_LIBEXECDIR}" RELATIVE_RPATH) - if(isFramework) - set_target_properties(${qtWebEngineProcessName} PROPERTIES MACOSX_BUNDLE TRUE) + set_target_properties(${qtWebEngineProcessName} PROPERTIES + MACOSX_BUNDLE TRUE + INSTALL_RPATH "@loader_path/../../../../../../../" + ) + target_sources(${qtWebEngineProcessName} PRIVATE QtWebEngineProcess.entitlements) set_source_files_properties(QtWebEngineProcess.entitlements PROPERTIES MACOSX_PACKAGE_LOCATION Resources @@ -72,6 +74,7 @@ if(isFramework) COMPONENT Runtime ) else() + qt_apply_rpaths(TARGET ${qtWebEngineProcessName} INSTALL_PATH "${INSTALL_LIBEXECDIR}" RELATIVE_RPATH) install(TARGETS ${qtWebEngineProcessName} CONFIGURATIONS ${configs} RUNTIME DESTINATION "${INSTALL_LIBEXECDIR}" |