diff --git a/CMakeLists.txt b/CMakeLists.txt index 737cfff30e54bda1dff3945ee3c242d14602925b..dc58a0539c4023e1e42308d5b587d2c85e4dfa4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,12 @@ cmake_path(APPEND module_dir "${qtqmldir}" "${module_target_path}") message(STATUS "Module dir ${module_dir}") +# allow the installed plugin to find its backing library +set_property( + TARGET "${module_plugin_target}" + APPEND PROPERTY INSTALL_RPATH "${qtlibdir}" +) + # Install the QML module runtime loadable plugin install(TARGETS "${module_plugin_target}" LIBRARY DESTINATION "${module_dir}"