Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost Root directory structure for CMAKE
From: Mateusz Łoskot (mateusz_at_[hidden])
Date: 2011-10-25 11:54:12

On 25 October 2011 16:26, Alistair Lowe <ali_lowe_at_[hidden]> wrote:
> Hi guys,
> I've been building Boost with the following command:
> bjam install --prefix=myInstallLoation toolset=gcc-arm target-os=linux
> This leaves me with the following directory structure:
> ---------------------------------
> myInstallLocation
>        >Boost-1_47
>                >Boost
> ---------------------------------
> If I tell a CMAKE project that Boost is located at 'myInstallLocation' it's
> unable to find boost.
> Does anyone know what directory structure CMAKE is looking for and if
> there's a way to automatically generate files for such a structure?

If you scan your filesystem for FindBoost.cmake and look into this
file, you will find it.
Note, set of paths may be different depending on CMake version (so
version of the FindBoost.cmake module).

Basically, it expects layout like this:


So, you set BOOST_ROOT as include directory, then #include <boost/...> works.
However, the lookup is not that simple, it involves more locations.

Here is what I see in FindBoost.cmake from CMake 2.8 installation:


Best regards,

Mateusz Loskot,
Charter Member of OSGeo,
Member of ACCU,

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at