From 5a10613dd24531c6b7ea63baefa375eed7f977dd Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 25 Jun 2024 23:17:15 +0200 Subject: [PATCH] build: Add lib folder to all plugin's RPATH --- cmake/modules/ImHexPlugin.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmake/modules/ImHexPlugin.cmake b/cmake/modules/ImHexPlugin.cmake index fe45034ed..32cbad7af 100644 --- a/cmake/modules/ImHexPlugin.cmake +++ b/cmake/modules/ImHexPlugin.cmake @@ -88,9 +88,18 @@ macro(add_imhex_plugin) # Fix rpath if (APPLE) - set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/plugins") + set_target_properties( + ${IMHEX_PLUGIN_NAME} + PROPERTIES + INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/plugins" + ) elseif (UNIX) - set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES INSTALL_RPATH_USE_ORIGIN ON INSTALL_RPATH "$ORIGIN/") + set_target_properties( + ${IMHEX_PLUGIN_NAME} + PROPERTIES + INSTALL_RPATH_USE_ORIGIN ON + INSTALL_RPATH "$ORIGIN/;${CMAKE_INSTALL_PREFIX}/lib" + ) endif() if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt AND IMHEX_ENABLE_UNIT_TESTS AND IMHEX_ENABLE_PLUGIN_TESTS)