From 89b30a0f0143ecfab2b261b3f7d28545952d7bf1 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 15 Sep 2023 07:59:44 -0700 Subject: [PATCH] ogre2: use CMAKE_INSTALL_RPATH (#909) 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 --- ogre2/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ogre2/src/CMakeLists.txt b/ogre2/src/CMakeLists.txt index ed89988d3..cfd9b220b 100644 --- a/ogre2/src/CMakeLists.txt +++ b/ogre2/src/CMakeLists.txt @@ -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}