-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (34 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.16.3)
project(rhoban_graphs)
option (RHOBAN_GRAPHS_BUILD_APPS "Build rhoban_graphs apps" OFF)
include_directories(include ${catkin_INCLUDE_DIRS})
#Enable C++17
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra")
#Enable Weird option linker
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
#List Sources sub source directories
set(SOURCES_DIRECTORIES
src/rhoban_graphs
)
#Include Sources sub sources
foreach (DIRECTORY ${SOURCES_DIRECTORIES})
message(STATUS "-- Sources: Adding ${DIRECTORY}/")
include (${DIRECTORY}/Sources.cmake)
set (PREFIXED_SOURCES)
foreach (SOURCE ${SOURCES})
set (PREFIXED_SOURCES ${PREFIXED_SOURCES} ${DIRECTORY}/${SOURCE})
endforeach (SOURCE)
set (ALL_SOURCES ${ALL_SOURCES} ${PREFIXED_SOURCES})
endforeach (DIRECTORY)
add_library (rhoban_graphs ${ALL_SOURCES})
target_link_libraries(rhoban_graphs PUBLIC rhoban_geometry)
target_include_directories(rhoban_graphs PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
rhoban_geometry
)
if (RHOBAN_GRAPHS_BUILD_APPS)
add_executable (astarTest src/a_star_test.cpp)
target_link_libraries (astarTest rhoban_graphs)
add_executable (graphTest src/test.cpp)
target_link_libraries (graphTest rhoban_graphs)
endif()