Boost logo

Boost :

Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-21 16:01:00


paul wrote:
> On Wed, 2017-06-21 at 15:11 +0300, Peter Dimov via Boost wrote:
> > What I had in mind was more like this:
> >
> > add_library(pumpkin ${PUMPKIN_SOURCES})
> >
> > add_library(pumpkin_zlib ${PUMPKIN_ZLIB_SOURCES})
> > target_link_libraries(pumpkin_zlib pumpkin)
> > target_link_libraries(pumpkin_zlib ZLIB::ZLIB)
> >
> > with the find_package logic residing in the rootmost CMakeLists, where
> > the project links or does not link to pumpkin_zlib, as appropriate.
>
> The find_package shouldn't be in the root directory. It should be in the
> same project directory as that is what that project needs, and each
> project should be standalone.

In other words, what I wrote, with find_package(ZLIB) prepended?

How are version conflicts resolved? If library A says find_package(Boost
1.62.0) and later library B says find_package(Boost 1.64.0), can I
find_package(Boost 1.64.0) at root level first to keep them happy?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk