Setting environment variable in local_setup.bash from ament_cmake package
Hello,
I'd like to set/modify an environment variable when the user sources the local_setup.bash
from compiling my packages with colcon
. I haven't succeeded at finding how to do this.
My packages use the ament_cmake
build method.
Reading https://colcon.readthedocs.io/en/rele... it seems there are some automated detections done by colcon, and ament_cmake
generates its own local_setup.bash
. But I do not find how to explicitly say 'set this variable' or if I should generate another script to be sourced, and how I should instruct colcon or ament_cmake to pick it up.
Thanks for any guidance.
Update 2021-05-08
It seems that adding contents to the install/pkg/share/pkg/package.dsv
file should do it. Still not clear how to do this. I've read through https://colcon.readthedocs.io/en/rele... and https://docs.ros.org/en/foxy/Guides/A... and I feel I am near the intended solution. Basically I need to make colcon aware of the existence of a new .dsv
file.