|
Boost : |
Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: paul (pfultz2_at_[hidden])
Date: 2017-06-21 16:50:35
On Wed, 2017-06-21 at 19:01 +0300, Peter Dimov via Boost wrote:
> 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?
Yes
>
> 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?Â
Yes, although, the root doesn't need to say `find_package` at all since its
getting boost with `add_subdirectory`, right?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk