]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blobdiff - CMakeLists.txt
Merge branch 'release/0.7.0'
[hubacji1/iamcar.git] / CMakeLists.txt
index df49c3b5ae5b54e5c105420954ad6b4b8b4b94b1..6893951587f25192ee2879d0aa046e7f4a303377 100644 (file)
@@ -1,26 +1,54 @@
 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
 
         base/main.cc
 
-        base/nn.cc
-        base/nv.cc
-        base/sample.cc
         base/rrtbase.cc
         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")