Hi all,

I am using the code below in cmakelists.txt to find the boost libraries
using cmake 2.8. 
After the execution "Boost_LIBRARIES" does not contain anything. Am I
correct in assuming that this variable must be populated with the list
of boost libraries?
Also, I am not sure how do I get the appropriate debug/release boost
libraries depending on the build configuration.
What are your thoughts on the FindBoost.cmake file located at the link
below (It was discussed in the mailing list in January 2008)?
http://www.cmake.org/pipermail/cmake/2008-January/019245.html

Thanks,
Vikas

------------------------------------------------------------------------
---------------------------------------------------
set(BOOST_ROOT "C:/Program Files/boost1.35.0")
set(Boost_DEBUG TRUE)
#search for BOOST
INCLUDE(${CMAKE_MODULE_PATH}/FindBoost.cmake)

IF (Boost_FOUND)
    #compare version strings 
    STRING (COMPARE LESS "${Boost_VERSION}" 1.35.0 VersionIncompatible)
    IF (VersionIncompatible)
        MESSAGE(FATAL_ERROR "Boost ${Boost_VERSION} not supported. 
        Only 1.35.0 version is supported.")
    ELSE (VersionIncompatible)
        MESSAGE (STATUS "Found Boost ${Boost_VERSION} --
${Boost_LIBRARIES}")
        INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
        SET(requiredLibs ${requiredLibs} ${Boost_LIBRARIES})
    ENDIF (VersionIncompatible)
ELSE (Boost_FOUND)
    MESSAGE (STATUS "Boost NOT FOUND")
ENDIF (Boost_FOUND)

------------------------------------------------------------------------
-------------------------------------------------------
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to