-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.3
-
None
-
openSUSE Leap 15.5 x86_64
Qt with oss licensed & installed via online installer
As the title says, when `cmake --install`, `qt_deploy_runtime_dependencies` will add many `../` to the `RPATH`
If you setup a project with `cmake` like the following:
qt_generate_deploy_script(
TARGET MyApp
OUTPUT_SCRIPT MyAppDeploy
CONTENT [[
qt_deploy_qml_imports(
# Deploy QML modules used by MyApp
TARGET MyApp
# The found QML plugins are stored in the plugins_found variable
PLUGINS_FOUND plugins_found
# The QML modules will be deployed into a custom directory
# QML_DIR "myqmldir"
# Qt QML modules will be skipped, only project-created QML modules will be deployed
NO_QT_IMPORTS
)
# Deploy application runtime dependencies and runtime dependencies
# of the found QML module plugins.
qt_deploy_runtime_dependencies(
EXECUTABLE $<TARGET_FILE:MyApp>
BIN_DIR ${CMAKE_INSTALL_BINDIR}
LIB_DIR ${CMAKE_INSTALL_LIBDIR}
ADDITIONAL_MODULES ${plugins_found}
)
]])
You maybe get an error as following:
CMake Error at /opt/Qt/6.6.3/gcc_64/lib/cmake/Qt6Core/Qt6CoreDeploySupport.cmake:139 (file):
file RPATH_SET could not write new RPATH:
$ORIGIN/../../../../lib64
to the file:
/home/neo/demoapp/qml/My/Namespace/Nested/libMyLongNameLib.so
The replacement path is too long for the RUNPATH entry.
But by just using qt_generate_deploy_app_script(), the RPATH will keep to be $ORIGIN/.../lib64 for my case.