[CMake] Patch to find Boost under Windows

Judicaël Bedouet j.bedouet at infonie.fr
Tue Sep 2 18:56:10 EDT 2008


>On 03.09.08 00:01:38, Judicaël Bedouet wrote:
>>* I have downloaded Multithread DLL for Visual Studio 2003 and tried to find
*>>* them with CMake 2.6-1. Boost version is 1.35
*>>* CMake finds headers but can't find libraries. CMake search the following
*>>* directories :
*>>*
*>>*    - C:/boost/lib
*>>*    - C:/boost
*>>*    -
*>>*    $ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}
*>>*    - $ENV{ProgramFiles}/Boost
*>>*
*>>* Third path refers to variables ${Boost_FIND_VERSION_MAJOR},
*>>* ${Boost_FIND_VERSION_MINOR} and ${Boost_FIND_VERSION_PATCH} but I
don't want
*>>* to specify a specific version. So, this paths is valued at C:\Program
*>>* Files/boost/boost___/lib.
*>
>You're not specifying a _specific_ version, but a minimum version
>number. In most cases this is a good idea, especially if you don't test
>your code with older versions of the library.
>

OK. I will specify a minimum version. Should be 1.34 or 1.33 for my
project under Linux.

>>* Standard Boost installer installs libraries to "C:\Program
*>>* Files\boost\boost_1_35_0\lib".
*>>*
*>>* So, I suggest this patch. After reading Boost_LIB_VERSION and Boost_VERSION
*>>* in boost/version.hpp, we could add path
*>>* $ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib
*>>* to library search dirs. It works fine for me.
*>>*
*>>* Could this be applied to future CMake versions ?*

>Looks fine to me, but you might want to open a bugreport in the CMake
>issue tracker.

Done. http://public.kitware.com/Bug/view.php?id=7593

>Andreas

Thanks,
J. Bedouet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080903/cc90fce3/attachment.htm>


More information about the CMake mailing list