Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] FindBoost.cmake can't find Boost 1.38
From: Philip Lowman (philip_at_[hidden])
Date: 2009-06-21 12:46:53


On Sat, Jun 20, 2009 at 11:06 PM, Lucas Thode <ljthode_at_[hidden]> wrote:

> This is on Windows XP:
>
> I installed Boost 1.38.0 from the BoostConsulting binary installer (it
> lives in C:\Program Files\Boost\boost_1_38). I also installed CMake
> 4.6-patch4 from its installer. When I run CMake on a CMakeLists.txt
> containing:
>
> set(Boost_USE_STATIC_LIBS ON)
> set(Boost_USE_MULTITHREADED ON)
>
> find_package(Boost 1.36.0 REQUIRED COMPONENTS program_options)
>
> CMake complains that it can't find the Boost library files.
>
> I turned Boost_DEBUG on and it turns out _boost_STATIC_TAG is set to "-s",
> which is wrong for my Boost installation (the static libraries are named
> libboost_<component name>-<compiler suffix>-<thread suffix>-<abi
> suffix>-1_38.lib in my installation). Is this a bug in FindBoost.cmake, or
> am I doing something wrong?

Might be a bug. On line 641 of FindBoost.cmake, where the
_boost_LIBRARIES_SEARCH_DIRS variable is initialized, could you try adding
this line and see if that helps?

"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"

If this does fix the problem and you'd like a workaround for the problem
until a fix can be released (or if this doesn't help at all) you can likely
use BOOST_ROOT or BOOST_LIBRARYDIR as a CMake variable or environment
variable.

Also, for whatever reason, FindBoost does not use the include path detected
for the headers as a hint for finding the libraries. Not sure why this is
but it probably should be fixed.

-- 
Philip Lowman


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk