willowgarage/catkin — Issue #96: audit catkin_project() and find_package(ROS COMPONENTS ...) calls
Author: gerkey
Created: 2012-02-28 20:38:20+00:00
State: open
Labels: defect, major

In a given package, we have two kinds of dependencies on other ROS projects:

* things that I need to build. These are declared via:

find_package(ROS COMPONENTS comp1 comp2 comp3 comp4)

* things that others need when building against me. These are declared via:

catkin_project(myproj
LIBRARIES mylib
INCLUDE_DIRS include
DEPENDS comp1 comp3)

The DEPENDS list doesn't have to be the same as the COMPONENTS list; e.g., if a COMPONENT is used internally and doesn't appear in public headers, then it doesn't have to be on the DEPENDS line.

The point of this ticket: audit all catkinized CMakeLists.txt and ensure that the DEPENDS lists are correct. When in doubt, make it equal to the COMPONENTS list; this essentially replicates the old rosbuild behavior, where we couldn't differentiate between these two kinds of dependencies.

As an example of the problem, I recently noticed that `topic_tools` had no DEPENDS list. This means that when other packages (whether catkin or rosbuild) depend on `topic_tools`, they don't get flags from things that are needed to build against `topic_tools`, like `roscpp`. I fixed that: https://code.ros.org/trac/ros/changeset/16414.