Skip to content

Commit

Permalink
Add Gazebo builtin plugins to LD_LIBRARY_PATH (#974)
Browse files Browse the repository at this point in the history
* Add Gazebo builtin plugins to LD_LIBRARY_PATH

Signed-off-by: Louise Poubel <[email protected]>

* cross-platform

Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored and j-rivero committed Oct 3, 2019
1 parent 3d58a8e commit e7975b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gazebo_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()

ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/gazebo_plugins.sh.in")

ament_package()

install(DIRECTORY include/
Expand Down
17 changes: 17 additions & 0 deletions gazebo_plugins/env-hooks/gazebo_plugins.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# generated from gazebo_plugins/env-hooks/gazebo_plugins.sh.in

# detect if running on Darwin platform
_UNAME=`uname -s`
_IS_DARWIN=0
if [ "$_UNAME" = "Darwin" ]; then
_IS_DARWIN=1
fi
unset _UNAME

if [ $_IS_DARWIN -eq 0 ]; then
ament_prepend_unique_value LD_LIBRARY_PATH @GAZEBO_PLUGIN_PATH@
else
ament_prepend_unique_value DYLD_LIBRARY_PATH @GAZEBO_PLUGIN_PATH@
fi
unset _IS_DARWIN

0 comments on commit e7975b1

Please sign in to comment.