Hi,

2009/8/26 Alfredo Correa <alfredo.correa@gmail.com>
> 2009/8/25 Chris Uzdavinis <cuz...@gmail.com>
> CMake is of great help for that!

thank you,
can you give a one or two line example on how use cmake to choose the
right boost library file?

Here is an example:

project( MyProject )

set( Boost_ADDITIONAL_VERSIONS "1.38.0" "1.39.0" )
set( Boost_USE_STATIC_LIBS OFF )
set( Boost_USE_MULTITHREAD ON )
find_package( Boost 1.36.0 REQUIRED )
if( Boost_FOUND )
    include_directories( ${Boost_INCLUDE_DIR} )
    link_directories( ${Boost_LIBRARY_DIR} )
else()
    message( FATAL_ERROR "Boost not found ! Please set Boost directories !" )
endif()

add_executable( projectbinary myproject.cpp )
target_link_libraries( projectbinary ${Boost_LIBRARIES} )

Have a look at cmake documentation for more details (http://www.cmake.org/cmake/help/cmake2.6docs.html and in particular http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindBoost).

Regards,

Olivier

 


Alfredo
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users