[CMake] Boost on Windows
Bill Hoffman
bill.hoffman at kitware.com
Tue Jun 23 16:46:06 EDT 2009
John Drescher wrote:
> On Tue, Jun 23, 2009 at 4:23 PM, Bill Hoffman<bill.hoffman at kitware.com> wrote:
>> Christopher Harvey wrote:
>>> define BOOST_ROOT and point it at the root install location for boost. I
>>> had the same problem, that fixed it. I only had to do that on windows.
>>>
>> There seems to be a bug in the FindBoost, BOOST_ROOT should not be required.
>> I got it to work by adding this:
>>
>>
>> SET(_boost_LIBRARIES_SEARCH_DIRS
>> C:/boost/lib
>> C:/boost
>>
>> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
>>
>> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
>> "$ENV{ProgramFiles}/boost"
>> /sw/local/lib
>> )
>>
>
> That explains why I needed to do that on windows also. I do not have
> boost in any of these locations...
>
I don't think boost puts anything in the registry, so if it is not in
the "usual" install location, CMake will not find it without setting
BOOST_ROOT. However, a "usual" install should just work. I have
checked in the fix to CVS CMake. If you install it somewhere else, you
will have to set BOOST_ROOT env or set it in the cmake-gui.
-Bill
More information about the CMake
mailing list