On Mar 19, 2010, at 3:34 PM, James C. Sutherland wrote:
Why not just let the user decide where they'd like to get boost,
and simplify your build system by just using find_package(Boost)?
For example, this is all you need for a simple boost-using app...
find_package(Boost 1.34.0 REQUIRED COMPONENTS filesystem system)
include_directories(${Boost_INCLUDE_DIR})
add_executable(yourapp yourapp.cpp)
target_link_libraries(yourapp ${Boost_LIBRARIES})
Indeed this is the best approach, although it isn't quite that
straightforward in all cases since the FindBoost.cmake module
functions a bit differently with the CMake installation than it does
with the bjam installation. For example, I do something like:
if( BOOST_CMAKE )
set(Boost_USE_STATIC ON)
find_package( Boost REQUIRED COMPONENTS ${boost_comps} NO_MODULE )
else()
set(Boost_USE_STATIC_LIBS ON)
find_package( Boost REQUIRED COMPONENTS ${boost_comps} )
endif()
where I define BOOST_CMAKE if I have a cmake-based boost installation.
Hmm, I don't have to do any of that for my Boost-Cmake installation.
There is a "trick" to configuring the Boost_CMake build so that it has
the same layout as a bjam built boost.
___________________________________________________________
Mike Jackson www.bluequartz.net
Principal Software Engineer mike.jack...@bluequartz.net
BlueQuartz Software Dayton, Ohio
_______________________________________________
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