Guest User

Untitled

a guest
Aug 20th, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.40 KB | None | 0 0
  1. cmake_minimum_required(VERSION 2.8)
  2. project(yauporot)
  3.  
  4. #enable C++x11
  5. add_definitions(-std=c++11)
  6. list( APPEND CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS} -g -ftest-coverage -fprofile-arcs")
  7.  
  8. #apply platform-specific flags
  9. if (UNIX)
  10.   message(status "Setting GCC flags")
  11.   #list(APPEND CMAKE_CXX_FLAGS " -fexceptions -g -Wall")
  12. else()
  13.   message(status "Setting MSVC flags")
  14.   list(APPEND CMAKE_CXX_FLAGS " /EHc-")
  15. endif()
  16.  
  17. set(CMAKE_AUTOMOC ON)
  18. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  19.  
  20. set(EXECUTABLE_NAME yauporot)
  21.  
  22. add_definitions(-DBOOST_ALL_DYN_LINK)
  23. #add_definitions(-DBOOST_ALL_NO_LIB)
  24. set(Boost_USE_STATIC_LIBS        OFF)
  25. set(Boost_USE_MULTITHREADED      ON)
  26. set(Boost_USE_STATIC_RUNTIME     OFF)
  27. set(BOOST_ALL_DYN_LINK           ON)
  28. find_package(Boost)
  29. message(status "** Boost Include: ${Boost_INCLUDE_DIR}")
  30. message(status "** Boost Libraries: ${Boost_LIBRARY_DIRS}")
  31. message(status "** Boost Libraries: ${Boost_LIBRARIES}")
  32.  
  33. include_directories(
  34.     ${CMAKE_CURRENT_SOURCE_DIR}/include/
  35.     ${Boost_INCLUDE_DIR}
  36. )
  37.  
  38. link_directories(
  39.     ${CMAKE_CURRENT_SOURCE_DIR}/lib/
  40.     ${Boost_LIBRARY_DIRS}
  41. )
  42.  
  43. file(
  44.     GLOB_RECURSE
  45.     SRC_FILES
  46.     src/*
  47. )
  48.  
  49. file(
  50.     GLOB_RECURSE
  51.     INCLUDE_FILES
  52.     include/*
  53. )
  54.  
  55. add_executable(
  56.     ${EXECUTABLE_NAME}
  57.     src/yauporot.cpp
  58. )
  59.  
  60. target_link_libraries(
  61.     ${EXECUTABLE_NAME}
  62.     ${LIBRARY_NAME}    
  63.     ${Boost_LIBRARIES}
  64. )
Advertisement
Add Comment
Please, Sign In to add comment