Skip to content

Commit

Permalink
build: Lock install path in rpath behind an option
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jun 28, 2024
1 parent 9a0a4d4 commit 2aef5e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/modules/ImHexPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,18 @@ macro(add_imhex_plugin)
INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/plugins"
)
elseif (UNIX)
set(PLUGIN_RPATH "")
list(APPEND PLUGIN_RPATH "$ORIGIN")

if (IMHEX_PLUGIN_ADD_INSTALL_PREFIX_TO_RPATH)
list(APPEND PLUGIN_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()

set_target_properties(
${IMHEX_PLUGIN_NAME}
PROPERTIES
INSTALL_RPATH_USE_ORIGIN ON
INSTALL_RPATH "$ORIGIN/;${CMAKE_INSTALL_PREFIX}/lib"
INSTALL_RPATH "${PLUGIN_RPATH}"
)
endif()

Expand Down

0 comments on commit 2aef5e4

Please sign in to comment.