Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] boost 1.41.0-cmake0 and CMake 2.6.4 - The usual, CMake can not find boost.
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-12-04 14:51:41


Michael Jackson wrote:
>
> Set INSTALL_VERSIONED=OFF
> set BOOST_INCLUDE_INSTALL_DIR=include/boost-1_41
> set BOOST_LIB_INSTALL_DIR=lib
>
> and then go. I also set an environment variable BOOST_ROOT to the
> CMAKE_INSTALL_PREFIX.
>
> In my CMake file I have the following;
>
> # ---------- Find Boost Headers/Libraries -----------------------
> SET (Boost_FIND_REQUIRED TRUE)
> SET (Boost_FIND_QUIETLY TRUE)
> set (Boost_USE_MULTITHREADED TRUE)
> set (Boost_USE_STATIC_LIBS TRUE)
> SET (Boost_ADDITIONAL_VERSIONS "1.41" "1.41.0")
>
> if ( NOT MXA_BOOST_HEADERS_ONLY)
> set (MXA_BOOST_COMPONENTS program_options unit_test_framework
> test_exec_monitor)
> endif()
>
> FIND_PACKAGE(Boost COMPONENTS ${MXA_BOOST_COMPONENTS} )
> INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
> LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
>
> This successfully works with the FindBoost.cmake that is included with
> CMake 2.6.4

OK, no worries, thanks for the working example, I've added it to the docs.

-t


Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk