Boost logo

Boost :

Subject: Re: [boost] Switch to CMake -- Analysis
From: Florent Castelli (florent.castelli_at_[hidden])
Date: 2017-07-21 20:24:41

On 21/07/2017 22:14, Roger Leigh via Boost wrote:
> On 21/07/17 20:53, Artyom Beilis via Boost wrote:
> [...]
>> And this is one of the most basic and trivial feature that exists in
>> every
>> real world build system.
>> And now take a look on this code:
>> Lines 124-145 this is how I search ICU for Boost.Locale
> Note that you can further simplify this to a single line:
> find_package(ICU COMPONENTS uc data i18n)
> and then use the imported targets ICU::uc, ICU::data and ICU::i18n to
> link with. Handles all the debug postfixes, alternative library names
> on Windows (dt/data, in/i18n) etc. It's basically what you're doing,
> but a bit more comprehensive and flexible (by using the imported
> targets, you allow for /export/ of the target configuration for use by
> end users and downstream components).

The old form also allows finding the various ICU libraries from
different installations / versions. The COMPONENTS approach doesn't have
that issue.

> This requires FindICU.cmake, which is provided in newer CMake
> releases. But it's absolutely possible to copy this into your own
> project to support older CMake releases (I do this myself). See
> for further
> details.
> Regards,
> Roger
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at