[CMake] How to include Boost in Visual Studio cmake project

Philip Lowman philip at yhbt.com
Thu Nov 12 07:44:59 EST 2009


On Thu, Nov 12, 2009 at 5:55 AM, Hendrik Sattler <post at hendrik-sattler.de>wrote:

> Zitat von Martin Peter Christiansen <martin.p.christiansen at gmail.com>:
>
>  In "C:\local\boost\lib" I have
>> - libboost_thread-vc90-mt.lib
>> - libboost_thread-vc90-mt-gd-1_39.lib
>> - libboost_thread-vc90-mt-gd.lib
>>
>
> MSVC libs usually do not have the lib... prefix. I am not sure if CMake
> does find them in this case.
>
>
The static MSVC libraries always have the lib prefix on Windows, the dynamic
MSVC libraries do not.

You have to set this variable to enable searching for static libraries.

set(Boost_USE_STATIC_LIBS    ON)

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091112/771f5683/attachment.htm>


More information about the CMake mailing list