[CMake] Compiling and building using boost under Windows.

Rolf Eike Beer eike at sf-mail.de
Thu Oct 13 08:05:20 EDT 2011


> Hi everyone,
>
> I'm trying to compile in Windows an app that I have been working on in
> Ubuntu for a while.
>
> My problem is that FindBoost.cmake does not find my boost libraries even
> though they are in the system.
>
> I have them compiled with the compiler "vc71, vc80.....and so on"
>
> I indicate in my cmake file  to use :
>
>   SET (BOOST_LIB_PREFIX "lib")
>   SET (BOOST_COMPILER "-vc71") //tried the other compilers as well.
>
> FindBoost finds my boost directory but it does not find the libraries. The
> libraries look like this : libboost_filesystem-vcXX-mt-1_47 ,
> boost_filesystem-vcXX-mt-1_47 and libboost_filesystem-vcXX-mt-1_47.dll
>
> It looks like it is a problem that can be fixed modifying some boost
> variables like prefixes or suffixes but I have tried some combinations and
> didn't come up with a solution that works

Try this (and remove the others):

set(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0")

Eike


More information about the CMake mailing list