Boost logo

Boost Users :

Subject: Re: [Boost-users] How to find Boost 1.40.0 with cmake 2.6?
From: Christopher Currie (christopher_at_[hidden])
Date: 2009-09-19 02:04:33


On Fri, Sep 18, 2009 at 8:20 AM, Mikko Vainio <mikko.vainio_at_[hidden]> wrote:
> Yes, according to my experience you need Boost_ADDITIONAL_VERSIONS set as
> you do, and the option -DBOOST_ROOT=/path/to/boost on the command line to
> cmake. This works for me.

Also, the only libraries that are "found" are ones that are (a)
compiled, such as date_time or filesystem, and (b) requested in the
find_package command:

    find_package(Boost 1.40.0 COMPONENTS date_time filesystem system)

to link to these you'll need to add:

    target_link_libraries(foo ${Boost_LIBRARIES})

check the source for FindBoost.cmake in your CMake installation for
more information.

HTH,
Christopher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net