ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
catkin_package( .. DEPENDS ..)
basically makes it easier for ROS pkgs to export things like compile and linker flags by gathering all flags and then putting those in the right places for you.
For that it needs to know where those flags are stored (ie: the names of the variables), and that is what you tell it by giving it the DEPENDS arg0 [arg1 ..[]]
list.
One assumption that is made -- to avoid having to manually list all the arg0_LIBRARIES
and arg1_INCLUDE_FLAGS
variables yourself, is that the find_package()
scripts for your dependencies have properly created and initialised those variables and that the name you provide (ie: eigen
in your case) is actually the prefix used by the find-script in question.
That last bit is a bit of a weakspot as there is no real requirement for find-scripts to do that, but it is something that Catkin assumes.
Looking at your CMakeLists.txt
, I see find_package(Eigen3 REQUIRED)
, but your DEPENDS
argument has eigen
. To know for sure we'd have to check what the find-script for Eigen3
does, but it could well be that using Eigen3
(or eigen3
) in the DEPENDS
list would resolve the issue you are experiencing.
Edit: from this comment on ros/cmake_modules#25 I gather that the Eigen3
find-script uses a EIGEN3_
prefix.
Note btw that the Indigo->Jade migration guide has something to say about Eigen and Eigen3 as well: Eigen CMake Module in cmake_modules.
2 | No.2 Revision |
catkin_package( .. DEPENDS ..)
basically makes it easier for ROS pkgs to export things like compile and linker flags by gathering all flags and then putting those in the right places for you.
For that it needs to know where those flags are stored (ie: the names of the variables), and that is what you tell it by giving it the DEPENDS arg0 [arg1 ..[]]
list.
One assumption that is made -- to avoid having to manually list all the arg0_LIBRARIES
and arg1_INCLUDE_FLAGS
variables yourself, is that the find_package()
scripts for your dependencies have properly created and initialised those variables and that the name you provide (ie: eigen
in your case) is actually the prefix used by the find-script in question.
That last bit is a bit of a weakspot as there is no real requirement for find-scripts to do that, but it is something that Catkin assumes.assumes. But using those variable names is a recommended / best practice in CMake.
Looking at your CMakeLists.txt
, I see find_package(Eigen3 REQUIRED)
, but your DEPENDS
argument has eigen
. To know for sure we'd have to check what the find-script for Eigen3
does, but it could well be that using Eigen3
(or eigen3
) in the DEPENDS
list would resolve the issue you are experiencing.
Edit: from this comment on ros/cmake_modules#25 I gather that the Eigen3
find-script uses a EIGEN3_
prefix.
Note btw that the Indigo->Jade migration guide has something to say about Eigen and Eigen3 as well: Eigen CMake Module in cmake_modules.