Skip to content

Commit caaf1f2

Browse files
committed
fix INSTALL_RPATH on ROS & OSX
ref. #353 ref. jrl-umi3218/jrl-cmakemodules#588
1 parent a1150e8 commit caaf1f2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cmake

Submodule cmake updated 1 file

python/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ set_target_properties(
4343
RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
4444
"${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}")
4545

46-
if(UNIX AND NOT APPLE)
47-
set_target_properties(${PYWRAP} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
46+
if(UNIX)
47+
get_relative_rpath(${${PYWRAP}_INSTALL_DIR} ${PYWRAP}_INSTALL_RPATH)
48+
set_target_properties(${PYWRAP} PROPERTIES INSTALL_RPATH
49+
"${${PYWRAP}_INSTALL_RPATH}")
4850
endif()
4951

5052
install(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})

0 commit comments

Comments
 (0)