Posted By


xxtjaxx on 10/27/09

Tagged


Statistics


Viewed 52 times
Favorited by 0 user(s)

Related snippets


Boost+CMake examble


/ Published in: C++
Save to your folder(s)

A small examble for using boost with CMake based Projects.


Copy this code and paste it in your HTML
  1. cmake_minimum_required( VERSION 2.6 FATAL_ERROR )
  2. # search for Boost version 1.34
  3.  
  4. find_package( Boost 1.38 COMPONENTS filesystem )
  5.  
  6. link_directories ( ${Boost_LIBRARY_DIRS} )
  7.  
  8. if(Boost_FOUND)
  9. include_directories(
  10. ${Boost_INCLUDE_DIRS}
  11. ./src/header/
  12. )
  13.  
  14. add_executable (
  15. ./bin/mkproject
  16. ./src/mkproject_config.cpp
  17. ./src/mkproject_extras.cpp
  18. ./src/mkproject_main.cpp
  19. ./src/mkproject_output.cpp
  20. ./src/mkproject_sources.cpp
  21. ./src/mkproject_sources_default.cpp
  22. )
  23. target_link_libraries (
  24. ./bin/mkproject
  25. ${Boost_LIBRARIES}
  26. )
  27. endif()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.