Statistics
| Branch: | Revision:

root / custompackages / hello-boost-graph / CMakeLists.txt @ 146281ca

History | View | Annotate | Download (863 Bytes)

1
cmake_minimum_required(VERSION 3.3)
2

    
3
set (PROJECT_NAME "hello_boost_graph" CXX)
4
project (${PROJECT_NAME})
5

    
6
# set (PROJECT_SOURCE_DECLARATION_DIRECTORY ${PROJECT_SOURCE_DIR}/include)
7
set (PROJECT_SOURCE_DEFINITION_DIRECTORY ${PROJECT_SOURCE_DIR}/src)
8
set (MAIN_FILE ${PROJECT_SOURCE_DEFINITION_DIRECTORY}/hello-boost-graph.cpp)
9

    
10
# set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
11

    
12
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
13

    
14
set (BOOST_ROOT "/usr/local/boost/")
15

    
16
find_package(Boost)
17
if(Boost_FOUND)
18
    include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
19
endif()
20

    
21
include_directories (${PROJECT_SOURCE_DECLARATION_DIRECTORY})
22

    
23
# "Add an executable to the project using the specified source files."
24
add_executable(${PROJECT_NAME} ${MAIN_FILE})
25

    
26
# "Link a target to given libraries."
27
target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
28