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

I'm achieving this by checking if CATKIN_DEVEL_PREFIX is set. There may be more elegant solutions, but this seems to work.

I'm achieving this by checking if CATKIN_DEVEL_PREFIX is set. There may be more elegant solutions, but this seems to work.With this, I can detect if the package is being built with catkin even if ROS is installed on the machine and the catkin workspace is sourced (which happens in my .bashrc, so it's always sourced)

Alternative solution:

If it doesn't have to work if the catkin workspace is sourced you can also check for catkin_FOUND, as suggested by @gvdhoorn. This is a bit nicer, but it doesn't work for my needs.