diff --git a/CMakeLists.txt b/CMakeLists.txt index 31903aa..3059876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,7 @@ project(gz_led_plugin) # Vendored from https://github.com/jasmeet0915/gz_sim_led_plugin with a local # patch (see src/LedPlugin.cpp) so identical model instances don't collide on -# scoped visual/light names. Built for Gazebo Harmonic (gz-sim8), matching the -# versions the existing dave_gz_world_plugins package uses in this workspace. +# scoped visual/light names. Built for Gazebo Harmonic (gz-sim8) find_package(ament_cmake REQUIRED) find_package(gz-cmake3 REQUIRED) @@ -42,6 +41,8 @@ install( ) # Put libgz_led_plugin.so on GZ_SIM_SYSTEM_PLUGIN_PATH when the workspace is sourced. +set(AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_gz_led_plugin + "prepend-non-duplicate;GZ_SIM_SYSTEM_PLUGIN_PATH;lib") ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env_hooks/gz_led_plugin.sh.in") ament_package() diff --git a/env_hooks/gz_led_plugin.sh.in b/env_hooks/gz_led_plugin.sh.in index 5109142..fc4d7d5 100644 --- a/env_hooks/gz_led_plugin.sh.in +++ b/env_hooks/gz_led_plugin.sh.in @@ -1 +1 @@ -export GZ_SIM_SYSTEM_PLUGIN_PATH="@CMAKE_INSTALL_PREFIX@/lib:${GZ_SIM_SYSTEM_PLUGIN_PATH}" +ament_prepend_unique_value GZ_SIM_SYSTEM_PLUGIN_PATH "$AMENT_CURRENT_PREFIX/lib"