Commit 7aa7be77 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[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
parent 4912628d
# Copyright 2010, 2020, François Bleibel, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
# ROS buildfarm uses isolated environments, in which the build rpath is used
set(BUILD_WITH_INSTALL_RPATH TRUE)
SET(plugins
sot/sot
......@@ -91,6 +94,7 @@ set(task-unilateral_deps task)
FOREACH(plugin ${plugins})
GET_FILENAME_COMPONENT(LIBRARY_NAME ${plugin} NAME)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${plugin})
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH $ORIGIN)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment