Skip to content

Commit 7aa7be7

Browse files
committed
[CMake] set RPATH for plugins
the install rpath allow plugins to find each other ROS buildfarm test everything in isolated environments, se we must also set the build rpath
1 parent 4912628 commit 7aa7be7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Copyright 2010, 2020, François Bleibel, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
22

3+
# ROS buildfarm uses isolated environments, in which the build rpath is used
4+
set(BUILD_WITH_INSTALL_RPATH TRUE)
5+
36
SET(plugins
47
sot/sot
58

@@ -91,6 +94,7 @@ set(task-unilateral_deps task)
9194
FOREACH(plugin ${plugins})
9295
GET_FILENAME_COMPONENT(LIBRARY_NAME ${plugin} NAME)
9396
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${plugin})
97+
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH $ORIGIN)
9498

9599
IF(SUFFIX_SO_VERSION)
96100
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})

0 commit comments

Comments
 (0)