-
Notifications
You must be signed in to change notification settings - Fork 56
/
CMakeLists.txt
executable file
·54 lines (46 loc) · 961 Bytes
/
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
49
50
51
52
53
54
cmake_minimum_required(VERSION 2.8.3)
project(eskf)
find_package(catkin REQUIRED COMPONENTS
roscpp
geometry_msgs
sensor_msgs
message_filters
message_generation
eigen_conversions
mavros_msgs
)
find_package(cmake_modules)
find_package(Eigen3 REQUIRED)
catkin_package(
CATKIN_DEPENDS message_runtime
)
# include headers
include_directories(
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${mavros_INCLUDE_DIRS}
include
include/eskf
)
# build shared library
add_library(ESKF
src/ESKF.cpp
)
set(RELEVANT_LIBRARIES
ESKF
${catkin_LIBRARIES}
${mavros_LIBRARIES}
)
# rigorous error checking
add_definitions("-Wall -Werror -O3 -std=c++11")
# build main filter
add_executable(${PROJECT_NAME}
src/eskf.cpp
src/Node.cpp
)
target_link_libraries(${PROJECT_NAME} ${RELEVANT_LIBRARIES})
# ensures messages are generated before hand
add_dependencies(${PROJECT_NAME}
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)