Skip to content

Commit d73e277

Browse files
committed
[CMake] set RPATH for plugins
to fix debian packages creation on ROS buildfarm: 00:12:11 dpkg-shlibdeps: error: cannot find library libtracer.so.4.3.1 needed by debian/ros-noetic-dynamic-graph/opt/ros/noetic/lib/dynamic-graph-plugins/libtracer-real-time.so.4.3.1 (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '')
1 parent 2226e69 commit d73e277

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
2+
13
SET(plugins
24
traces/tracer
35
traces/tracer-real-time
@@ -12,6 +14,7 @@ FOREACH(plugin ${plugins})
1214
IF(SUFFIX_SO_VERSION)
1315
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
1416
ENDIF(SUFFIX_SO_VERSION)
17+
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH $ORIGIN)
1518

1619
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME} ${${LIBRARY_NAME}_deps})
1720

0 commit comments

Comments
 (0)