<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font>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)?<br>
<br>For example, this is all you need for a simple boost-using app...<br><br>find_package(Boost 1.34.0 REQUIRED COMPONENTS filesystem system)<br>include_directories(${Boost_INCLUDE_DIR})<br>add_executable(yourapp yourapp.cpp)<br>
target_link_libraries(yourapp ${Boost_LIBRARIES})<br><br></blockquote></div>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:<div><br></div><div><div>if( BOOST_CMAKE )</div><div> set(Boost_USE_STATIC ON)</div><div> find_package( Boost REQUIRED COMPONENTS ${boost_comps} NO_MODULE )</div><div>else()</div><div> set(Boost_USE_STATIC_LIBS ON)</div><div> find_package( Boost REQUIRED COMPONENTS ${boost_comps} )</div><div>endif()</div><div><br></div><div>where I define BOOST_CMAKE if I have a cmake-based boost installation.</div></div></body></html>