[CMake] Patch to find Boost under Windows
Andreas Pakulat
apaku at gmx.de
Tue Sep 2 18:28:35 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.
> 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.
Andreas
--
You're growing out of some of your problems, but there are others that
you're growing into.
More information about the CMake
mailing list