Hello,
I was trying to lookup for a component using the provided
orocos-rtt-config.cmake in RTT-2.x. I had some problem described below.
1. The provided example find_package(OROCOS-RTT COMPONENTS scripting)
doesn't work. It has to be find_package(OROCOS-RTT COMPONENTS
rtt-scripting).
2. We absolutely need to use the uppercase OROCOS-RTT in the find_package
macro, otherwise the COMPONENTS are ignored.
3. The supported components are only plugins. Should the same COMPONENTS
argument handle other components such as all OCL components? We could also
look in /lib/orocos, not only in /lib/orocos/plugins ?
Philippe
Problem with components lookup in orocos-rtt-config.cmake?
On Friday 21 January 2011 16:54:57 Philippe Hamelin wrote:
> Hello,
>
> I was trying to lookup for a component using the provided
> orocos-rtt-config.cmake in RTT-2.x. I had some problem described below.
>
> 1. The provided example find_package(OROCOS-RTT COMPONENTS scripting)
> doesn't work. It has to be find_package(OROCOS-RTT COMPONENTS
> rtt-scripting).
True. Fixed this.
>
> 2. We absolutely need to use the uppercase OROCOS-RTT in the find_package
> macro, otherwise the COMPONENTS are ignored.
I wasn't aware of this (although Adolfo might have warned me about this).
I'll adapt the orocreate-pkg template then to use the all-caps version.
>
> 3. The supported components are only plugins. Should the same COMPONENTS
> argument handle other components such as all OCL components? We could also
> look in /lib/orocos, not only in /lib/orocos/plugins ?
I'm not against this, but I won't maintain it or develop it.
We have another solution ready for 2.3, using the UseOrocos.cmake macros. We
process the manifest.xml file, lookup all dependencies' .pc file and set the
include and linking flags. We depend on xpath to parse the manifest.xml file in
case rospack is not available.
In turn, a .pc file is generated for your package which others can use by
listing the package in their manifest.xml file.
This is on my toolchain-2.2-newlayout branch on github, as I announce a month
ago.
Peter
Problem with components lookup in orocos-rtt-config.cmake?
>
> >
>
> 3. The supported components are only plugins. Should the same COMPONENTS
> > argument handle other components such as all OCL components? We could
> also
> > look in /lib/orocos, not only in /lib/orocos/plugins ?
>
> I'm not against this, but I won't maintain it or develop it.
>
> We have another solution ready for 2.3, using the UseOrocos.cmake macros.
> We
> process the manifest.xml file, lookup all dependencies' .pc file and set
> the
> include and linking flags. We depend on xpath to parse the manifest.xml
> file in
> case rospack is not available.
>
> In turn, a .pc file is generated for your package which others can use by
> listing the package in their manifest.xml file.
>
>
I wasn't aware of that solution and I'm ok with this one. I will kept my own
CMake logic until this is officialy released.
Thank you!