[Bug 583] New: flawed pkgconfig cmake logic for helper libraries

For more infomation about this bug, visit
Summary: flawed pkgconfig cmake logic for helper libraries
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Build system
AssignedTo: orocos-dev [..] ...
ReportedBy: klaas [dot] gadeyne [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

While fixing some copy paste errors in the comments of the cmake logic
yesterday, I noticed something weird. To make it short: a lot of the helper
libraries that are located using the cmake PKGCONFIG macro won't be found
unless they are installed in /usr

I take the example of BFL: BFL installations are not detected since the
BFL_INSTALL variable passed by the user is simply *not* taken into account.
This is what I did to fix it, but since quite some files are copied from
FindBFL.cmake, I expect the fix has to be applied in a few places...

[kgad@ampere ~/SVN/orocos/ocl-macosx]$
svn diff config/FindBFL.cmake
Index: config/FindBFL.cmake
===================================================================
--- config/FindBFL.cmake (revision 29513)
+++ config/FindBFL.cmake (working copy)
@@ -10,6 +10,8 @@
IF ( CMAKE_PKGCONFIG_EXECUTABLE )

MESSAGE( STATUS "Detecting BFL" )
+
+ SET(ENV{PKG_CONFIG_PATH} "${BFL_INSTALL}/lib/pkgconfig/")
MESSAGE( "Looking for BFL in: ${BFL_INSTALL}")
PKGCONFIG( "orocos-bfl >= 0.4.2" BFL_FOUND BFL_INCLUDE_DIRS BFL_DEFINES
BFL_LINK_DIRS BFL_LIBS )

[Bug 583] flawed pkgconfig cmake logic for helper libraries

https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=583

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.8.1
Resolution| |FIXED
Status|NEW |RESOLVED

--- Comment #2 from Peter Soetens <peter [..] ...> 2009-06-21 22:04:10 ---
This was fixed in OCL 1.8.0

[Bug 583] flawed pkgconfig cmake logic for helper libraries

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |peter [dot] soetens [..] ...

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-08-20 10:33:24 ---
(In reply to comment #0)
> While fixing some copy paste errors in the comments of the cmake logic
> yesterday, I noticed something weird. To make it short: a lot of the helper
> libraries that are located using the cmake PKGCONFIG macro won't be found
> unless they are installed in /usr
>
> I take the example of BFL: BFL installations are not detected since the
> BFL_INSTALL variable passed by the user is simply *not* taken into account.
> This is what I did to fix it, but since quite some files are copied from
> FindBFL.cmake, I expect the fix has to be applied in a few places...
>
> [kgad@ampere ~/SVN/orocos/ocl-macosx]$
> svn diff config/FindBFL.cmake
> Index: config/FindBFL.cmake
> ===================================================================
> --- config/FindBFL.cmake (revision 29513)
> +++ config/FindBFL.cmake (working copy)
> @@ -10,6 +10,8 @@
> IF ( CMAKE_PKGCONFIG_EXECUTABLE )
>
> MESSAGE( STATUS "Detecting BFL" )
> +
> + SET(ENV{PKG_CONFIG_PATH} "${BFL_INSTALL}/lib/pkgconfig/")
> MESSAGE( "Looking for BFL in: ${BFL_INSTALL}")
> PKGCONFIG( "orocos-bfl >= 0.4.2" BFL_FOUND BFL_INCLUDE_DIRS BFL_DEFINES
> BFL_LINK_DIRS BFL_LIBS )
>

The other Orocos specific helpers do not have this bug :

$ wcgrep -l PKG_CONFIG_PATH
./FindPkgConfig.cmake
./FindOrocosRTT.cmake
./FindKDL.cmake
./FindComedi.cmake

Not updated are FindGthread.cmake, FindOpenCV.cmake, FindGTK+-2.0.cmake,
FindOpencv7.cmake of which only FindOpenCV is used ( by hardware/camera).µ

This patch is upto the BFL developers in OCL...

Peter