CMake: Fix rpath adjustment when deploying QML plugins
If Qt is configured with a custom value for INSTALL_QMLDIR, e.g. via "configure -qmldir lib/qml", then we must adjust the rpath for QML plugins. Otherwise they won't be able to load Qt libraries. We had general code that adjusts the rpath for plugins, but that only triggered if INSTALL_LIBDIR was different from the user project's CMAKE_INSTALL_LIBDIR. Now, we always adjust the rpath of plugins on Linux. The operation is cheap, and I don't quite see how to add a robust condition for all desired cases. Pick-to: 6.8 6.9 Fixes: QTBUG-125223 Change-Id: Ib511fbc2b733deac804191773e56be9b6adf5e68 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
7869593119
commit
ecd63d469f
@ -3085,10 +3085,10 @@ function(_qt_internal_setup_deploy_support)
|
||||
|
||||
# Check whether we will have to adjust the RPATH of plugins.
|
||||
if("${QT_DEPLOY_FORCE_ADJUST_RPATHS}" STREQUAL "")
|
||||
set(must_adjust_plugins_rpath "")
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"
|
||||
AND NOT CMAKE_INSTALL_LIBDIR STREQUAL QT6_INSTALL_LIBS)
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(must_adjust_plugins_rpath ON)
|
||||
else()
|
||||
set(must_adjust_plugins_rpath OFF)
|
||||
endif()
|
||||
else()
|
||||
set(must_adjust_plugins_rpath "${QT_DEPLOY_FORCE_ADJUST_RPATHS}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user