ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In .em templates for environment hooks only the following variables are available from the CMake context: https://github.com/ros/catkin/blob/indigo-devel/cmake/templates/env-hook.context.py.in

If you need additional custom variables in your template you have to use .in files (which are expanded by the CMake configure_file function which will pass all CMake variable to the template).

Independent of the template type you can either use one template which conditionally deals with devel and install space (https://github.com/ros/ros/blob/hydro-devel/core/rosbuild/env-hooks/10.rosbuild.sh.em) or you can use separate templates for both. In that case you distinguish the template by inserting develspace / installspace between the filename and the extension (http://docs.ros.org/api/catkin/html/dev_guide/generated_cmake_api.html#catkin-add-env-hooks).