CMake: Fix rpath set for Qml plugins to not contain lib64
Qt6QmlMacros uses the value of GNUInstallDirs's CMAKE_INSTALL_LIBDIR to calculate the rpath from a Qml plugin's location to the Qt libraries. By default CMake detects the value of CMAKE_INSTALL_LIBDIR, and on an RHEL system it is set to 'lib64', whereas we usually configure Qt with the lib dir set to just 'lib'. This might cause issues with Qml plugins not locating the Qt libs due to an incorrect rpath. Ensure that when building Qt libraries and plugins, CMAKE_INSTALL_LIBDIR is set to the same lib dir value that Qt was configured with. Pick-to: 6.3 Fixes: QTBUG-99707 Task-number: QTBUG-100432 Change-Id: I17b2a22d46ef3b40084a2f6a4992f0e23b35d4d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
40828992eb
commit
bb9be22133
@ -251,6 +251,11 @@ set(CMAKE_INSTALL_RPATH "" CACHE STRING "RPATH for installed binaries")
|
||||
# link against QtCore.
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# Ensure that GNUInstallDirs's CMAKE_INSTALL_LIBDIR points to the same lib dir that Qt was
|
||||
# configured with. Currently this is important for QML plugins, which embed an rpath based
|
||||
# on that value.
|
||||
set(CMAKE_INSTALL_LIBDIR "${INSTALL_LIBDIR}")
|
||||
|
||||
function(qt_setup_tool_path_command)
|
||||
if(NOT CMAKE_HOST_WIN32)
|
||||
return()
|
||||
|
Loading…
x
Reference in New Issue
Block a user