Skip to content

Commit

Permalink
ogre2: use CMAKE_INSTALL_RPATH (#909)
Browse files Browse the repository at this point in the history
Sets the ogre2 target INSTALL_RPATH to a copy of
CMAKE_INSTALL_RPATH with OGRE_LIBRARY_DIRS
appended, instead of just the latter path. This
helps with packaging on macOS.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Sep 15, 2023
1 parent 59417ba commit 89b30a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ogre2/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ set_property(
target_compile_definitions(${ogre2_target}
PRIVATE OGRE_IGNORE_UNKNOWN_DEBUG)

# Add OGRE2_LIBRARY_DIRS to INSTALL_RPATH
# Append to a copy of CMAKE_INSTALL_RPATH since that is the default
set(ogre2_target_install_rpath ${CMAKE_INSTALL_RPATH})
list(APPEND ogre2_target_install_rpath ${OGRE2_LIBRARY_DIRS})
set_property(
TARGET ${ogre2_target}
PROPERTY INSTALL_RPATH
${OGRE2_LIBRARY_DIRS}
${ogre2_target_install_rpath}
)

target_include_directories(${ogre2_target}
Expand Down

0 comments on commit 89b30a0

Please sign in to comment.