How to use OCL components with CMake ?

I am a bit lost with integration of RTT and OCL with CMake. I can't find
where documention is about that :
_ it's not in the Component builde manual
_ it's briefly explain in the Installation manual for RTT
_ copying controler-1-solution/config/*.cmake did not succeed (BTW it's not
easy to find those examples)

First question :
After boostraping my orocos toolchain (in /opt/orocos2) I tar all my install
directory (+ the env.sh) in order to publish this to my collegues. They
untar this in the same directory (/opt/orocos2/install). If they use
find_package(OROCOS-RTT) on their untared installation, will it work ? (I
think the findOrocosRtt.cmake is in /opt/orocos2/rtt which is not on their
machine).

Second question :
Do I need to link by hand to all OCL libraries ? Or do I have a magic
find_package(OCL) ?

How to use OCL components with CMake ?

On Thursday 16 December 2010 23:03:37 Willy Lambert wrote:
> I am a bit lost with integration of RTT and OCL with CMake. I can't find
> where documention is about that :
> _ it's not in the Component builde manual
> _ it's briefly explain in the Installation manual for RTT
> _ copying controler-1-solution/config/*.cmake did not succeed (BTW it's not
> easy to find those examples)

We're working on it to update these...

>
> First question :
> After boostraping my orocos toolchain (in /opt/orocos2) I tar all my
> install directory (+ the env.sh) in order to publish this to my collegues.
> They untar this in the same directory (/opt/orocos2/install). If they use
> find_package(OROCOS-RTT) on their untared installation, will it work ? (I
> think the findOrocosRtt.cmake is in /opt/orocos2/rtt which is not on their
> machine).

I believe it should work. It's really an installation, and everything is found
in the install directory. There is no FindOrocosRTT.cmake file. We use the
cmake -config.cmake trickery, found in the install/lib/cmake directory.

typegen/orogen won't work since they require the gems in the .gems directory,
outside the install/ dir.

>
> Second question :
> Do I need to link by hand to all OCL libraries ? Or do I have a magic
> find_package(OCL) ?

To which OCL libraries do you wish to link ? Normal applications/components
will only link to RTT, using the UseOrocos.cmake macros. See the orocreate-pkg
program that got installed in 'install' too, to generate all that boilerplate
code.

Peter

How to use OCL components with CMake ?

2010/12/17 Peter Soetens <peter [..] ...>

> On Thursday 16 December 2010 23:03:37 Willy Lambert wrote:
> > I am a bit lost with integration of RTT and OCL with CMake. I can't find
> > where documention is about that :
> > _ it's not in the Component builde manual
> > _ it's briefly explain in the Installation manual for RTT
> > _ copying controler-1-solution/config/*.cmake did not succeed (BTW it's
> not
> > easy to find those examples)
>
> We're working on it to update these...
>
>
Ok, I'll wait

> >
> > First question :
> > After boostraping my orocos toolchain (in /opt/orocos2) I tar all my
> > install directory (+ the env.sh) in order to publish this to my
> collegues.
> > They untar this in the same directory (/opt/orocos2/install). If they use
> > find_package(OROCOS-RTT) on their untared installation, will it work ? (I
> > think the findOrocosRtt.cmake is in /opt/orocos2/rtt which is not on
> their
> > machine).
>
> I believe it should work. It's really an installation, and everything is
> found
> in the install directory. There is no FindOrocosRTT.cmake file. We use the
> cmake -config.cmake trickery, found in the install/lib/cmake directory.
>
>
cool ! I've never seen this folder before.

> typegen/orogen won't work since they require the gems in the .gems
> directory,
> outside the install/ dir.
>

currently it doesn't matter for me.

>
> >
> > Second question :
> > Do I need to link by hand to all OCL libraries ? Or do I have a magic
> > find_package(OCL) ?
>
> To which OCL libraries do you wish to link ?

orocos-deployment-gnulinux;orocos-taskbrowser-gnulinux;orocos-logging-gnulinux

I wasn't clear : of course I don't mind linking this by hand at the end. I'm
just lost between what I have to do on my own and what I should expect from
Orocos toolchain Cmake services.
I thougth all of this was automatically linked in previous version 2.1. I
don't know where and how, but none of my scripts where linking to this and
it used to work ...

> Normal applications/components
> will only link to RTT,

using the UseOrocos.cmake macros. See the orocreate-pkg
> program that got installed in 'install' too, to generate all that
> boilerplate
> code.
>
> Peter
>
>

How to use OCL components with CMake ?

On Friday 17 December 2010 00:55:47 Willy Lambert wrote:
> 2010/12/17 Peter Soetens <peter [..] ...>
>
> > On Thursday 16 December 2010 23:03:37 Willy Lambert wrote:
> > > I am a bit lost with integration of RTT and OCL with CMake. I can't
> > > find where documention is about that :
> > > _ it's not in the Component builde manual
> > > _ it's briefly explain in the Installation manual for RTT
> > > _ copying controler-1-solution/config/*.cmake did not succeed (BTW it's
> >
> > not
> >
> > > easy to find those examples)
> >
> > We're working on it to update these...
>
> Ok, I'll wait
>
> > > First question :
> > > After boostraping my orocos toolchain (in /opt/orocos2) I tar all my
> > > install directory (+ the env.sh) in order to publish this to my
> >
> > collegues.
> >
> > > They untar this in the same directory (/opt/orocos2/install). If they
> > > use find_package(OROCOS-RTT) on their untared installation, will it
> > > work ? (I think the findOrocosRtt.cmake is in /opt/orocos2/rtt which
> > > is not on
> >
> > their
> >
> > > machine).
> >
> > I believe it should work. It's really an installation, and everything is
> > found
> > in the install directory. There is no FindOrocosRTT.cmake file. We use
> > the cmake -config.cmake trickery, found in the install/lib/cmake
> > directory.
>
> cool ! I've never seen this folder before.
>
> > typegen/orogen won't work since they require the gems in the .gems
> > directory,
> > outside the install/ dir.
>
> currently it doesn't matter for me.
>
> > > Second question :
> > > Do I need to link by hand to all OCL libraries ? Or do I have a magic
> > > find_package(OCL) ?
> >
> > To which OCL libraries do you wish to link ?
>
> orocos-deployment-gnulinux;orocos-taskbrowser-gnulinux;orocos-logging-gnuli
> nux
>
> I wasn't clear : of course I don't mind linking this by hand at the end.
> I'm just lost between what I have to do on my own and what I should expect
> from Orocos toolchain Cmake services.
> I thougth all of this was automatically linked in previous version 2.1. I
> don't know where and how, but none of my scripts where linking to this and
> it used to work ...

There are two possibilities: we now link with -Wl,-zdefs which detect undefined
symbols. + the orocos-ocl-<target>.pc file is actually empty in the 2.2.0
release due to a regression. So if you used that, it's broken.

>
> > Normal applications/components
> > will only link to RTT,
>
> using the UseOrocos.cmake macros. See the orocreate-pkg
>
> > program that got installed in 'install' too, to generate all that
> > boilerplate
> > code.
> >
> > Peter

Peter