[Ros-release] Exporting headers of non-catkin package dependencies

Daniel Stonier d.stonier at gmail.com
Sat Nov 24 06:13:17 UTC 2012

Sorry - wrong list. Please ignore.


On 24 November 2012 15:09, Daniel Stonier <d.stonier at gmail.com> wrote:

> Hi all,
> I had to bang my head around this for a while today.
> *Problem*
> *
> *
> My catkin package foo depends on Eigen, which of course, has headers
> installed in a non-standard location. I can do a find_package(Eigen) in foo
> and foo is happy.
> Next problem, my new catkin package bar depends on foo, so indirectly
> requires those eigen headers. Now bar shouldn't have to do a
> find-package(Eigen), so the question was how to get catkin to export that
> eigen include directory.
> *Solution*
> *
> *
> I hunted around all the other core ros packages which depended on eigen,
> but they didn't do anything special.
> Finally, checking out the catkin_package.cmake code, there is a variable
> DEPENDS (not CATKIN_DEPENDS) you can set that will export the appropriate
> include directory without repeating the find_package lookup for a non-ros
> package. That seems to be a nice solution.
> *Issues*
> *
> *
> Firstly, is this the right approach? If it is, it's probably a really key
> point to document somewhere (if I missed it, enlighten me please).
> Secondly, all those core ros packages probably do the same, otherwise
> packages depending on them and subsequently Eigen indirectly will have to
> do additional find_package(Eigen) calls for no reason.
> This probably is important for other external dependencies like log4cxx as
> well (though being in ubuntu's system include directory, the problem hides
> until someone compiles or cross-compiles on a slightly non-standard
> platform - windows being one).
> Cheers,
> Daniel.

Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin R&D: http://rnd.yujinrobot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-release/attachments/20121124/4d847dc7/attachment-0009.html>

More information about the Ros-release mailing list