diff options
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/BuildDeps.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/BuildDeps.cmake b/cmake/BuildDeps.cmake index 1b8eae3..890da57 100644 --- a/cmake/BuildDeps.cmake +++ b/cmake/BuildDeps.cmake @@ -119,3 +119,13 @@ if(NOT EXISTS "${QTOPCUA_INSTALL_DIR}/lib/libQt6OpcUa.so") else() message(STATUS "qtopcua already built, skipping") endif() + +# The QtOpcUa backend plugin uses $ORIGIN-relative RUNPATH that resolves to +# qtopcua-install/lib/. Symlink the open62541 libs there so dlopen finds them. +file(GLOB _open62541_libs "${OPEN62541_INSTALL_DIR}/lib/libopen62541*") +foreach(_lib ${_open62541_libs}) + get_filename_component(_name ${_lib} NAME) + if(NOT EXISTS "${QTOPCUA_INSTALL_DIR}/lib/${_name}") + file(CREATE_LINK ${_lib} "${QTOPCUA_INSTALL_DIR}/lib/${_name}" SYMBOLIC) + endif() +endforeach() |
