-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
48 lines (37 loc) · 1.56 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
44
45
46
47
48
PROJECT(reference_car)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
MESSAGE(STATUS "Compiling Dynamic Tracker")
MESSAGE(STATUS "Using compiler: ${CMAKE_CXX_COMPILER}")
MESSAGE(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "Arch: ${CMAKE_SYSTEM_PROCESSOR}")
# SET(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror")
SET(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
IF(${CMAKE_BUILD_TYPE} MATCHES "Release")
MESSAGE(STATUS "Additional Flags for Release mode")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -DNDEBUG")
ELSEIF(${CMAKE_BUILD_TYPE} MATCHES "Debug")
MESSAGE(STATUS "Additional Flags for Debug mode")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
ENDIF()
FIND_PACKAGE(Ceres REQUIRED)
INCLUDE_DIRECTORIES(${CERES_INCLUDE_DIRS})
INCLUDE($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
ROSBUILD_INIT()
SET(ROS_BUILD_STATIC_LIBS true)
SET(ROS_BUILD_SHARED_LIBS false)
MESSAGE(STATUS "ROS-Overrride Build Type: ${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "CXX Flags: ${CMAKE_CXX_FLAGS}")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
SET(libs roslib roscpp rosbag glog gflags amrl-shared-lib lua5.1
pthread)
ADD_SUBDIRECTORY(src/shared)
INCLUDE_DIRECTORIES(src/shared)
INCLUDE_DIRECTORIES(src)
ROSBUILD_ADD_EXECUTABLE(ekf_tracker
src/ekf_tracker/ekf_tracker_main.cc
src/ekf_tracker/ekf_tracker.cc)
TARGET_LINK_LIBRARIES(ekf_tracker ${libs})
ADD_EXECUTABLE(tracker_unit_tests
src/tests/ekf_tracker_tests.cc)
TARGET_LINK_LIBRARIES(tracker_unit_tests gtest gtest_main ${libs})