]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - CMakeLists.txt
Merge branch 'release/0.7.0'
[hubacji1/iamcar.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.7)
2 project(iamcar)
3
4 IF(PLANNER)
5         ADD_DEFINITIONS(-DPLANNER=${PLANNER})
6 ENDIF(PLANNER)
7 IF(TMAX)
8         ADD_DEFINITIONS(-DTMAX=${TMAX})
9 ENDIF(TMAX)
10 IF(USE_GL)
11         ADD_DEFINITIONS(-DUSE_GL=1)
12 ENDIF(USE_GL)
13 IF(USE_SLOTPLANNER)
14         ADD_DEFINITIONS(-DUSE_SLOTPLANNER=1)
15 ENDIF(USE_SLOTPLANNER)
16
17 find_package(OpenMP)
18 if (OPENMP_FOUND)
19     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
20     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
21     set (CMAKE_EXE_LINKER_FLAGS
22             "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
23 endif()
24
25 add_compile_options(-Wall -g -Wno-unknown-pragmas)
26 include_directories(incl)
27 add_executable(go_car_go
28
29         base/main.cc
30
31         base/rrtbase.cc
32         base/rrtnode.cc
33
34         decision_control/rrtplanner.cc
35         decision_control/slotplanner.cc
36
37         perception/obstacle.cc
38
39         vehicle_platform/bcar.cc
40         vehicle_platform/cost.cc
41         vehicle_platform/dubins.cc
42         vehicle_platform/reeds_shepp.cpp
43         vehicle_platform/steer.cc
44 )
45
46 target_link_libraries(go_car_go jsoncpp)
47 IF (USE_GL)
48         target_link_libraries(go_car_go SDL2)
49         target_link_libraries(go_car_go GL)
50         target_link_libraries(go_car_go GLU)
51 ENDIF (USE_GL)
52 IF (PLANNER MATCHES "T3")
53         target_link_libraries(go_car_go pthread)
54 ENDIF (PLANNER MATCHES "T3")