Created
April 12, 2012 12:49
-
-
Save yuya-oc/2367010 to your computer and use it in GitHub Desktop.
Using Boost with CMake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_package(Boost COMPONENTS program_options thread REQUIRED) | |
if(Boost_FOUND) | |
message("Boost is found:") | |
message(" Boost_INCLUDE_DIRS= ${Boost_INCLUDE_DIRS}") | |
message(" Boost_LIBRARIES= ${Boost_LIBRARIES}") | |
message(" Boost_LIBRARY_DIRS= ${Boost_LIBRARY_DIRS}") | |
include_directories(${Boost_INCLUDE_DIRS}) | |
add_definitions("-DHAS_BOOST") | |
endif() | |
add_executable(foo | |
main.cpp | |
) | |
target_link_libraries(foo ${Boost_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment