Hi everyone,<br><br>I am using CMake to build some code cross-platform. This code requires Boost Thread to compile. I am having several problems with FindBoost on Windows.<br><br>First, I installed Boost using BoostPro&#39;s precompiled binaries at <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 &quot;-- Boost:&quot;)<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 &quot;Boost_INCLUDE_DIR    : ${Boost_INCLUDE_DIR}&quot;)<br>
message(STATUS &quot;Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}&quot;)<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/<div id=":yr" class="ii gt">

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 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>
</div><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 arguments, setting BOOST_ROOT accordingly, and then calling &quot;find_package(Boost COMPONENTS thread REQUIRED)&quot; but it seems odd to need to do that. Any thoughts?<br>

<br>A full, working CMakeLists.txt for my project can be seen at:<br><br>  <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt">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 Boost, particularly on Windows; it would be nice to trim down the configuration a bit.<br><br>Thanks,<br>Curtis<br><br>