FindOCL.cmake

Hi,

is there a FindOCL.cmake code?

Regards,

Leo

FindOCL.cmake

On Monday 21 January 2008 18:08:09 Leopold Palomo-Avellaneda wrote:
> Hi,
>
> is there a FindOCL.cmake code?

See

Which is part of the 'template' example application for RTT+OCL.

Peter

FindOCL.cmake

On Tue, Jan 22, 2008 at 5:42 PM, Peter Soetens
<peter [dot] soetens [..] ...> wrote:
> On Monday 21 January 2008 18:08:09 Leopold Palomo-Avellaneda wrote:
> > Hi,
> >
> > is there a FindOCL.cmake code?
>
> See
>
>
> Which is part of the 'template' example application for RTT+OCL.

I just got bitten by the fact that this one only works if both rtt and
ocl are installed in the same location.

The attached patch solves that issue for me and renames orocos_install
to rtt_install. Note that this renders findcomponents.cmake depending
on the variable name that is used in the findorocosrtt.cmake file.

FindOCL.cmake

On Tue, Jan 22, 2008 at 5:42 PM, Peter Soetens
<peter [dot] soetens [..] ...> wrote:
> On Monday 21 January 2008 18:08:09 Leopold Palomo-Avellaneda wrote:
> > Hi,
> >
> > is there a FindOCL.cmake code?
>
> See
>
>
> Which is part of the 'template' example application for RTT+OCL.

I just got bitten by the fact that this one only works if both rtt and
ocl are installed in the same location.

The attached patch solves that issue for me and renames orocos_install
to rtt_install. Note that this renders findcomponents.cmake depending
on the variable name that is used in the findorocosrtt.cmake file.

FindOCL.cmake

On Wednesday 20 February 2008 16:52:16 Klaas Gadeyne wrote:
> On Tue, Jan 22, 2008 at 5:42 PM, Peter Soetens
<peter [dot] soetens [..] ...> wrote:
> > On Monday 21 January 2008 18:08:09 Leopold Palomo-Avellaneda wrote:
> > > Hi,
> > >
> > > is there a FindOCL.cmake code?
> >
> > See
> >
> > > >ndComponents.cmake>
> >
> > Which is part of the 'template' example application for RTT+OCL.
>
> I just got bitten by the fact that this one only works if both rtt and
> ocl are installed in the same location.
>
> The attached patch solves that issue for me and renames orocos_install
> to rtt_install. Note that this renders findcomponents.cmake depending
> on the variable name that is used in the findorocosrtt.cmake file.

I was thinking about it to use OROCOS_INSTALL as the 'default' place to look
for libraries, and if a library isn't found in there, OCL_INSTALL,
RTT_INSTALL etc can be set. This is very easy to do in the .cmake files, just
do (KDL example):

SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:
${OROCOS_INSTALL}/lib/pkgconfig")
MESSAGE( "Looking for KDL in: ${KDL_INSTALL} or ${OROCOS_INSTALL}")
PKGCONFIG( "orocos-kdl >= 1.0" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES
KDL_LINK_DIRS KDL_LIBS )

An alternative is:

IF ( NOT KDL_INSTALL )
SET(KDL_INSTALL OROCOS_INSTALL CACHE STRING "KDL location (defaults to
OROCOS_INSTALL")
ENDIF(NOT KDL_INSTALL)

This allows an application to find all libraries using:

cmake -DOROCOS_INSTALL=/usr/local/orocos

And add per-library settings if they are different...

Better solution ?

Peter

FindOCL.cmake

On Thu, 21 Feb 2008, Peter Soetens wrote:
[...]
> I was thinking about it to use OROCOS_INSTALL as the 'default' place to look
> for libraries, and if a library isn't found in there, OCL_INSTALL,
> RTT_INSTALL etc can be set. This is very easy to do in the .cmake files, just
> do (KDL example):

[...]
> This allows an application to find all libraries using:
>
> cmake -DOROCOS_INSTALL=/usr/local/orocos
>
> And add per-library settings if they are different...
>
> Better solution ?

I like the idea and I'm confident your cmake skills are far superior
to mine :-)

k

ps. As a side node, is there an easy way to debug such situations
using cmake? Using autotools, I could just look in configure.log to
figure out what went wrong, but I couldn't see similar files in the
subdirs of build at first glance?

FindOCL.cmake

[...]
> The attached patch solves that issue for me and renames orocos_install
> to rtt_install. Note that this renders findcomponents.cmake depending
> on the variable name that is used in the findorocosrtt.cmake file.

As promised :-)

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

FindOCL.cmake

[...]
> The attached patch solves that issue for me and renames orocos_install
> to rtt_install. Note that this renders findcomponents.cmake depending
> on the variable name that is used in the findorocosrtt.cmake file.

As promised :-)

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm