[CMake] How to find versioned Boost libraries?

Pau Garcia i Quiles pgquiles at elpauer.org
Thu Feb 19 07:18:59 EST 2009


On Thu, Feb 19, 2009 at 12:52 PM, Peter Simons <simons at cryp.to> wrote:
> Hi,
>
> I'm having trouble using CMake's FindBoost() with versioned libraries.
> Boost.System, for example, exists in the following variants:
>
>  libboost_system-gcc43-mt-1_38.a
>  libboost_system-gcc43-mt.a
>  libboost_system-gcc43-1_38.a
>  libboost_system-gcc43.a
>  ...
>
> Apparently, CMake 2.6.2 won't recognize that library because of the "gcc43"
> identifier mangled into the filename.

It's not gcc43 being mangled into the filename. The problem is
FindBoost.cmake from CMake 2.6.2 does not look for Boost 1.37.0 or
newer by default. Either you update to CMake CVS (or 2.6.3RC), or you
do this:

SET( Boost_ADDITIONAL_VERSIONS 1.38 1.38.0 )

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list