building Boost with CMake and using FindBoost.cmake are two totally different things.

Build boost however you want or get the official binaries from BoostPro.com and install as appropriate.

THEN in your own CMakeLists.txt file use something like the following:

set(Boost_USE_MULTITHREADED ON) # which is the default
FIND_PACKAGE(Boost 1.38 COMPONENTS program_options)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})  # Include the Boost Headers
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})

add_executable(myFoo ${srcs})
target_link_libraries(myFoo ${Boost_PROGRAM_OPTIONS_LIBRARY} )

This will link your executable to the Boost Program_Options library from the boost distribution. There is a "FindBoost.cmake" as part of the CMake distribution and is probably much easier to use than trying to reinvent it from scratch.


---
Mike Jackson                 www.bluequartz.net

PS: I was the one who put the "CMake is Experimental" flag in Boost's own CMake build system at the request of the Boost developers....
On Apr 15, 2009, at 7:26 PM, David Doria wrote:

Mike, good idea, but I was trying to stay away from boost's cmake until they didn't make set a flag saying " I agree this is experimental" haha.

_______________________________________________
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