<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">define BOOST_ROOT and point it at the root install location for boost. I<br>
had the same problem, that fixed it. I only had to do that on windows.<br></blockquote></div><br>Thanks Christopher, but I am aware of that fix. Actually, that's what my hack does -- it uses CMake to set BOOST_ROOT programmatically. What I'm getting at is that there is no reason FindBoost shouldn't be able to successfully find Boost with a vanilla BoostPro install on Windows using "find_package(Boost COMPONENTS thread REQUIRE)" (or whatever) when it can successfully do so with just "find_package(Boost)" with no arguments.<br>
<br>-Curtis<br><br><div class="gmail_quote">On Tue, Jun 23, 2009 at 3:44 PM, Christopher Harvey <span dir="ltr"><<a href="mailto:chris@basementcode.com">chris@basementcode.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
define BOOST_ROOT and point it at the root install location for boost. I<br>
had the same problem, that fixed it. I only had to do that on windows.<br>
<div><div></div><div class="h5"><br>
Curtis Rueden wrote:<br>
> Hi everyone,<br>
><br>
> I am using CMake to build some code cross-platform. This code requires<br>
> Boost Thread to compile. I am having several problems with FindBoost<br>
> on Windows.<br>
><br>
> First, I installed Boost using BoostPro's precompiled binaries at<br>
> <a href="http://www.boostpro.com/download" target="_blank">http://www.boostpro.com/download</a>.<br>
><br>
> Then I tried the following CMakeLists.txt file:<br>
><br>
> ----------<br>
> # Simple CMake build file for testing FindBoost. Fails on Windows with<br>
> # Boost binaries from BoostPro computing (<a href="http://www.boostpro.com/" target="_blank">http://www.boostpro.com/</a>).<br>
><br>
> cmake_minimum_required(VERSION 2.6)<br>
><br>
> project(boostFail1)<br>
><br>
> message(STATUS "-- Boost:")<br>
> set(Boost_USE_STATIC_LIBS OFF)<br>
> set(Boost_USE_MULTITHREAD ON)<br>
><br>
> find_package(Boost COMPONENTS thread REQUIRED)<br>
><br>
> message(STATUS "Boost_INCLUDE_DIR : ${Boost_INCLUDE_DIR}")<br>
> message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")<br>
> ----------<br>
><br>
> The error message I see is:<br>
><br>
> ----------<br>
> -- Boost:<br>
> CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/<br>
> FindBoost.cmake:868 (message):<br>
> Unable to find the requested Boost libraries.<br>
><br>
> Boost version: 1.38.0<br>
><br>
> Boost include path: C:/Program Files/boost/boost_1_38<br>
><br>
> The following Boost libraries could not be found:<br>
><br>
> boost_thread<br>
><br>
> No Boost libraries were found. You may need to set Boost_LIBRARYDIR<br>
> to the<br>
> directory containing Boost libraries or BOOST_ROOT to the location of<br>
> Boost.<br>
> Call Stack (most recent call first):<br>
> CMakeLists.txt:16 (find_package)<br>
><br>
><br>
> Boost_INCLUDE_DIR : C:/Program Files/boost/boost_1_38<br>
> Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND<br>
> ----------<br>
><br>
> The problem does not occur on Linux or Mac OS X.<br>
><br>
> I can work around the problem by calling find_package(Boost) with no<br>
> arguments, setting BOOST_ROOT accordingly, and then calling<br>
> "find_package(Boost COMPONENTS thread REQUIRED)" but it seems odd to<br>
> need to do that. Any thoughts?<br>
><br>
> A full, working CMakeLists.txt for my project can be seen at:<br>
><br>
><br>
> <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt" target="_blank">https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt</a><br>
><br>
> Over half of the lines of code are specifically for dealing with<br>
> Boost, particularly on Windows; it would be nice to trim down the<br>
> configuration a bit.<br>
><br>
> Thanks,<br>
> Curtis<br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</div></div></blockquote></div><br>