]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - CMakeLists.txt
Merge branch 'feature/slotplanner-sampling-info'
[hubacji1/iamcar.git] / CMakeLists.txt
index df49c3b5ae5b54e5c105420954ad6b4b8b4b94b1..9c2263ceadec0b204d3d1ebf62527e1cdba85e0d 100644 (file)
@@ -1,7 +1,28 @@
 cmake_minimum_required(VERSION 3.7)
-project(niam_car)
+project(iamcar)
 
-add_compile_options(-Wall -g)
+IF(PLANNER)
+        ADD_DEFINITIONS(-DPLANNER=${PLANNER})
+ENDIF(PLANNER)
+IF(TMAX)
+        ADD_DEFINITIONS(-DTMAX=${TMAX})
+ENDIF(TMAX)
+IF(USE_GL)
+        ADD_DEFINITIONS(-DUSE_GL=1)
+ENDIF(USE_GL)
+IF(USE_SLOTPLANNER)
+        ADD_DEFINITIONS(-DUSE_SLOTPLANNER=1)
+ENDIF(USE_SLOTPLANNER)
+
+find_package(OpenMP)
+if (OPENMP_FOUND)
+    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    set (CMAKE_EXE_LINKER_FLAGS
+            "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+endif()
+
+add_compile_options(-Wall -g -Wno-unknown-pragmas)
 include_directories(incl)
 add_executable(go_car_go
 
@@ -14,13 +35,23 @@ add_executable(go_car_go
         base/rrtnode.cc
 
         decision_control/rrtplanner.cc
+        decision_control/slotplanner.cc
 
         perception/obstacle.cc
 
         vehicle_platform/bcar.cc
         vehicle_platform/cost.cc
+        vehicle_platform/dubins.cc
         vehicle_platform/reeds_shepp.cpp
         vehicle_platform/steer.cc
 )
 
 target_link_libraries(go_car_go jsoncpp)
+IF (USE_GL)
+        target_link_libraries(go_car_go SDL2)
+        target_link_libraries(go_car_go GL)
+        target_link_libraries(go_car_go GLU)
+ENDIF (USE_GL)
+IF (PLANNER MATCHES "T3")
+        target_link_libraries(go_car_go pthread)
+ENDIF (PLANNER MATCHES "T3")