Redundancy in find_package(COMPONENTS) and catkin_package(CATKIN_DEPENDS)?
As I'm debugging an error with .so dependencies, I've began to wonder about find_package()
and catkin_package()
. On the Wiki here it says:
# Get the information about this package's buildtime dependencies
find_package(catkin REQUIRED
COMPONENTS message_generation std_msgs sensor_msgs)
## snip
# Declare that this catkin package's runtime dependencies
catkin_package(
CATKIN_DEPENDS message_runtime std_msgs sensor_msgs)
OK, so it's compile-time versus run-time dependencies. However, if I look at the auto-generated help here it says:
- CATKIN_DEPENDS (list of strings) – a list of catkin projects which this project depends on. It is used when client code finds this project via
find_package()
orpkg-config
. Each project listed will in turn be find_package-ed or is states as Requires in the .pc file. Therefore theirINCLUDE_DIRS
andLIBRARIES
will be appended to ours. Only catkin projects should be used where it be guarantee that they are find_packagable and have pkg-config files.
Now this says "Each project listed will in turn be find_package-ed", so it implies that catkin_package()
does a second find_package()
as the find_package(catkin COMPONENTS)
, according to the documentation already does:
Instead of using find_package on those packages, if you specify them as components, it will make life easier.
So, what actually is the definitive description of what they do?