Hello,

You could do something like this:

set(Boost_REQUIRED_COMPONENTS date-time thread filesystem iostreams)

find_package(Boost REQUIRED)

if(Boost_VERSION VERSION_LESS 1.39.0)
  set(Boost_REQUIRED_COMPONENTS ${Boost_REQUIRED_COMPONENTS} signals)
else()
  set(Boost_REQUIRED_COMPONENTS ${Boost_REQUIRED_COMPONENTS} signals2)
endif()

find_package(Boost REQUIRED COMPONENTS ${Boost_REQUIRED_COMPONENTS})

I have not tested it but it should work




On Tue, Jun 16, 2015 at 1:07 PM, Wim Dumon <w...@emweb.be> wrote:

> It's more a chicken-and-egg problem: we don't know the version of boost on
> the system before we searched for boost, but on the other had we have to
> specify the libraries to search at the moment that we call
> FindPackage(boost), when we don't know the boost version yet. This is
> indeed not optimal. You can simply remove boost_signals from the list of
> libraries to be searched (in cmake/WtFindBoost-cmake.txt, in variable
> Boost_COMPONENTS).
>
> BR,
> Wim.
>
>
> On 14 June 2015 at 04:58, Nathan Ridge <zeratul...@hotmail.com> wrote:
>
>> Hi,
>>
>> > Recent versions of Wt (I believe since 3.3.1) support signals and
>> > signals2, and will automatically use signals2 for boost versions
>> > that complain about the deprecation of signals. So upgrade Wt
>> > and the warning will go away.
>>
>> I tried building Wt 3.3.4 against a boost 1.58 installation that doesn't
>> have the 'signals' library built, but the Wt build system is still asking
>> for it:
>>
>>   Boost version: 1.58.0
>>
>>   Boost include path: /home/nr/dev/dist/boost/include
>>
>>   Could not find the following Boost libraries:
>>
>>           boost_signals
>>
>> Note that Boost.Signals2 is header-only.
>>
>> Am I doing something wrong, or is this a bug in the build system?
>>
>> Thanks,
>> Nate
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>


-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to