PATCH cmake: Add boost-thread dependent library to pkgconfig file for Mac OS X

Make boost::thread library a dependancy of orocos-rtt library in Mac OS X, allowing correct linking of projects dependent on orocos-rtt (ie OCL, user projects). Tested on Koala and Snow Leopard.

A similar patch is required for the logging, but I'll leave that on my release-rtlogging branch on github.
Stephen

AttachmentSize
0001-cmake-Add-boost-thread-dependent-library-to-pkgconfi.patch969 bytes

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
> Make boost::thread library a dependancy of orocos-rtt library in Mac OS X,
> allowing correct linking of projects dependent on orocos-rtt (ie OCL, user
> projects). Tested on Koala and Snow Leopard.
>
> A similar patch is required for the logging, but I'll leave that on my
> release-rtlogging branch on github. Stephen
>
This patch does not apply cleanly:

+++ b/config/check_depend.cmake
@@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
find_package(Boost 1.33 COMPONENTS thread REQUIRED)
endif ()
list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
+ # add to list of libraries in pkgconfig file
+ LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})

message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
Boost.thread on macosx." FORCE)

The endif() statement on top is not present on the mainlines (1.x/2.x). Am I
missing some patch ?

Peter

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Apr 21, 2010, at 06:25 , Peter Soetens wrote:

> On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
>> Make boost::thread library a dependancy of orocos-rtt library in Mac OS X,
>> allowing correct linking of projects dependent on orocos-rtt (ie OCL, user
>> projects). Tested on Koala and Snow Leopard.
>>
>> A similar patch is required for the logging, but I'll leave that on my
>> release-rtlogging branch on github. Stephen
>>
> This patch does not apply cleanly:
>
> +++ b/config/check_depend.cmake
> @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
> endif ()
> list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
> + # add to list of libraries in pkgconfig file
> + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
>
> message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
> set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
> Boost.thread on macosx." FORCE)
>
> The endif() statement on top is not present on the mainlines (1.x/2.x). Am I
> missing some patch ?
>
> Peter

Sorry, how about this one. Last one was from after a few custom patches ... this is directly against trunk.

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Wednesday 21 April 2010 14:53:46 S Roderick wrote:
> On Apr 21, 2010, at 06:25 , Peter Soetens wrote:
> > On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
> >> Make boost::thread library a dependancy of orocos-rtt library in Mac OS
> >> X, allowing correct linking of projects dependent on orocos-rtt (ie OCL,
> >> user projects). Tested on Koala and Snow Leopard.
> >>
> >> A similar patch is required for the logging, but I'll leave that on my
> >> release-rtlogging branch on github. Stephen
> >
> > This patch does not apply cleanly:
> >
> > +++ b/config/check_depend.cmake
> > @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
> > find_package(Boost 1.33 COMPONENTS thread REQUIRED)
> > endif ()
> > list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
> > + # add to list of libraries in pkgconfig file
> > + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
> >
> > message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
> > set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
> > Boost.thread on macosx." FORCE)
> >
> > The endif() statement on top is not present on the mainlines (1.x/2.x).
> > Am I missing some patch ?
> >
> > Peter
>
> Sorry, how about this one. Last one was from after a few custom patches ...
> this is directly against trunk.
>

Yeah, that's the one, but I already did a patch there too, so I manually
applied it *as is*. I'm a bit worried though about the case differences between
Boost_thread_INCLUDE_DIRS and Boost_THREAD_LIBRARY since cmake variables are
case sensitive... Is the former one wrong ?

Peter

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Apr 21, 2010, at 09:55 , Peter Soetens wrote:

> On Wednesday 21 April 2010 14:53:46 S Roderick wrote:
>> On Apr 21, 2010, at 06:25 , Peter Soetens wrote:
>>> On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
>>>> Make boost::thread library a dependancy of orocos-rtt library in Mac OS
>>>> X, allowing correct linking of projects dependent on orocos-rtt (ie OCL,
>>>> user projects). Tested on Koala and Snow Leopard.
>>>>
>>>> A similar patch is required for the logging, but I'll leave that on my
>>>> release-rtlogging branch on github. Stephen
>>>
>>> This patch does not apply cleanly:
>>>
>>> +++ b/config/check_depend.cmake
>>> @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
>>> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
>>> endif ()
>>> list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
>>> + # add to list of libraries in pkgconfig file
>>> + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
>>>
>>> message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
>>> set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
>>> Boost.thread on macosx." FORCE)
>>>
>>> The endif() statement on top is not present on the mainlines (1.x/2.x).
>>> Am I missing some patch ?
>>>
>>> Peter
>>
>> Sorry, how about this one. Last one was from after a few custom patches ...
>> this is directly against trunk.
>>
>
> Yeah, that's the one, but I already did a patch there too, so I manually
> applied it *as is*. I'm a bit worried though about the case differences between
> Boost_thread_INCLUDE_DIRS and Boost_THREAD_LIBRARY since cmake variables are
> case sensitive... Is the former one wrong ?
>
> Peter

I noticed that too, and hadn't tested/fixed it. Yes, I think the lowercase is incorrect.
S

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Wednesday 21 April 2010 16:21:08 Stephen Roderick wrote:
> On Apr 21, 2010, at 09:55 , Peter Soetens wrote:
> > On Wednesday 21 April 2010 14:53:46 S Roderick wrote:
> >> On Apr 21, 2010, at 06:25 , Peter Soetens wrote:
> >>> On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
> >>>> Make boost::thread library a dependancy of orocos-rtt library in Mac
> >>>> OS X, allowing correct linking of projects dependent on orocos-rtt (ie
> >>>> OCL, user projects). Tested on Koala and Snow Leopard.
> >>>>
> >>>> A similar patch is required for the logging, but I'll leave that on my
> >>>> release-rtlogging branch on github. Stephen
> >>>
> >>> This patch does not apply cleanly:
> >>>
> >>> +++ b/config/check_depend.cmake
> >>> @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
> >>> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
> >>> endif ()
> >>> list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
> >>> + # add to list of libraries in pkgconfig file
> >>> + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
> >>>
> >>> message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
> >>> set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
> >>> Boost.thread on macosx." FORCE)
> >>>
> >>> The endif() statement on top is not present on the mainlines (1.x/2.x).
> >>> Am I missing some patch ?
> >>>
> >>> Peter
> >>
> >> Sorry, how about this one. Last one was from after a few custom patches
> >> ... this is directly against trunk.
> >
> > Yeah, that's the one, but I already did a patch there too, so I manually
> > applied it *as is*. I'm a bit worried though about the case differences
> > between Boost_thread_INCLUDE_DIRS and Boost_THREAD_LIBRARY since cmake
> > variables are case sensitive... Is the former one wrong ?
> >
> > Peter
>
> I noticed that too, and hadn't tested/fixed it. Yes, I think the lowercase
> is incorrect. S

Yep, must be uppercase. I'll fix and push this.

Peter

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Apr 21, 2010, at 10:43 , Peter Soetens wrote:

> On Wednesday 21 April 2010 16:21:08 Stephen Roderick wrote:
>> On Apr 21, 2010, at 09:55 , Peter Soetens wrote:
>>> On Wednesday 21 April 2010 14:53:46 S Roderick wrote:
>>>> On Apr 21, 2010, at 06:25 , Peter Soetens wrote:
>>>>> On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
>>>>>> Make boost::thread library a dependancy of orocos-rtt library in Mac
>>>>>> OS X, allowing correct linking of projects dependent on orocos-rtt (ie
>>>>>> OCL, user projects). Tested on Koala and Snow Leopard.
>>>>>>
>>>>>> A similar patch is required for the logging, but I'll leave that on my
>>>>>> release-rtlogging branch on github. Stephen
>>>>>
>>>>> This patch does not apply cleanly:
>>>>>
>>>>> +++ b/config/check_depend.cmake
>>>>> @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
>>>>> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
>>>>> endif ()
>>>>> list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
>>>>> + # add to list of libraries in pkgconfig file
>>>>> + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
>>>>>
>>>>> message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
>>>>> set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
>>>>> Boost.thread on macosx." FORCE)
>>>>>
>>>>> The endif() statement on top is not present on the mainlines (1.x/2.x).
>>>>> Am I missing some patch ?
>>>>>
>>>>> Peter
>>>>
>>>> Sorry, how about this one. Last one was from after a few custom patches
>>>> ... this is directly against trunk.
>>>
>>> Yeah, that's the one, but I already did a patch there too, so I manually
>>> applied it *as is*. I'm a bit worried though about the case differences
>>> between Boost_thread_INCLUDE_DIRS and Boost_THREAD_LIBRARY since cmake
>>> variables are case sensitive... Is the former one wrong ?
>>>
>>> Peter
>>
>> I noticed that too, and hadn't tested/fixed it. Yes, I think the lowercase
>> is incorrect. S
>
> Yep, must be uppercase. I'll fix and push this.
>
> Peter

This is still broken. I have a working patch, tested in Lynx and Snow Leopard, on my github release branch.

git [..] ...:snrkiwi/orocos-rtt.git

Also, we should overhaul the cmake logic as part of the v2 series. We are duplicating certain functionality which should be done in one place.
Stephen

PATCH cmake: Add boost-thread dependent library to pkgconfig fil

On Jun 16, 2010, at 16:54 , Stephen Roderick wrote:

> On Apr 21, 2010, at 10:43 , Peter Soetens wrote:
>
>> On Wednesday 21 April 2010 16:21:08 Stephen Roderick wrote:
>>> On Apr 21, 2010, at 09:55 , Peter Soetens wrote:
>>>> On Wednesday 21 April 2010 14:53:46 S Roderick wrote:
>>>>> On Apr 21, 2010, at 06:25 , Peter Soetens wrote:
>>>>>> On Tuesday 20 April 2010 02:09:08 S Roderick wrote:
>>>>>>> Make boost::thread library a dependancy of orocos-rtt library in Mac
>>>>>>> OS X, allowing correct linking of projects dependent on orocos-rtt (ie
>>>>>>> OCL, user projects). Tested on Koala and Snow Leopard.
>>>>>>>
>>>>>>> A similar patch is required for the logging, but I'll leave that on my
>>>>>>> release-rtlogging branch on github. Stephen
>>>>>>
>>>>>> This patch does not apply cleanly:
>>>>>>
>>>>>> +++ b/config/check_depend.cmake
>>>>>> @@ -151,6 +151,8 @@ if(OROCOS_TARGET STREQUAL "macosx")
>>>>>> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
>>>>>> endif ()
>>>>>> list(APPEND OROCOS-RTT_INCLUDE_DIRS ${Boost_thread_INCLUDE_DIRS} )
>>>>>> + # add to list of libraries in pkgconfig file
>>>>>> + LIST(APPEND OROCOS-RTT_USER_LINK_LIBS ${Boost_THREAD_LIBRARY})
>>>>>>
>>>>>> message( "Forcing ORO_OS_USE_BOOST_THREAD to ON")
>>>>>> set( ORO_OS_USE_BOOST_THREAD ON CACHE BOOL "Forced enable use of
>>>>>> Boost.thread on macosx." FORCE)
>>>>>>
>>>>>> The endif() statement on top is not present on the mainlines (1.x/2.x).
>>>>>> Am I missing some patch ?
>>>>>>
>>>>>> Peter
>>>>>
>>>>> Sorry, how about this one. Last one was from after a few custom patches
>>>>> ... this is directly against trunk.
>>>>
>>>> Yeah, that's the one, but I already did a patch there too, so I manually
>>>> applied it *as is*. I'm a bit worried though about the case differences
>>>> between Boost_thread_INCLUDE_DIRS and Boost_THREAD_LIBRARY since cmake
>>>> variables are case sensitive... Is the former one wrong ?
>>>>
>>>> Peter
>>>
>>> I noticed that too, and hadn't tested/fixed it. Yes, I think the lowercase
>>> is incorrect. S
>>
>> Yep, must be uppercase. I'll fix and push this.
>>
>> Peter
>
>
> This is still broken. I have a working patch, tested in Lynx and Snow Leopard, on my github release branch.
>
> git [..] ...:snrkiwi/orocos-rtt.git

Use the much cleaner "next" branch instead of "release".
S