[CMake] Boost on Windows

Andreas Pakulat apaku at gmx.de
Tue Jun 23 13:26:42 EDT 2009


On 23.06.09 13:09:25, Curtis Rueden wrote:
> First, I installed Boost using BoostPro's precompiled binaries at
> http://www.boostpro.com/download.
> 
> Then I tried the following CMakeLists.txt file:
> 
> ----------
> # Simple CMake build file for testing FindBoost. Fails on Windows with
> # Boost binaries from BoostPro computing (http://www.boostpro.com/).
> 
> cmake_minimum_required(VERSION 2.6)
> 
> project(boostFail1)
> 
> message(STATUS "-- Boost:")
> set(Boost_USE_STATIC_LIBS OFF)
> set(Boost_USE_MULTITHREAD ON)
> 
> find_package(Boost COMPONENTS thread REQUIRED)
> 
> message(STATUS "Boost_INCLUDE_DIR    : ${Boost_INCLUDE_DIR}")
> message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> ----------
> 
> The error message I see is:
> 
> ----------
> -- Boost:
> CMake Error at C:/Program Files/CMake
> 2.6/share/cmake-2.6/Modules/FindBoost.cmake:868 (message):
>   Unable to find the requested Boost libraries.
> 
>   Boost version: 1.38.0
> 
>   Boost include path: C:/Program Files/boost/boost_1_38
> 
>   The following Boost libraries could not be found:
> 
>           boost_thread
> 
>   No Boost libraries were found.  You may need to set Boost_LIBRARYDIR to
> the
>   directory containing Boost libraries or BOOST_ROOT to the location of
>   Boost.
> Call Stack (most recent call first):
>   CMakeLists.txt:16 (find_package)
> 
> 
> Boost_INCLUDE_DIR    : C:/Program Files/boost/boost_1_38
> Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> ----------
> 
> The problem does not occur on Linux or Mac OS X.

Well, then most probably the layout of that binary installation differs
from what the FindBoost.cmake file expects. So where is the boost thread
library and how is it named? Looking at this:
 
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt

The layout of that package seems to be utterly broken.

Andreas

-- 
Caution: Keep out of reach of children.


More information about the CMake mailing list