forked from ydsf16/IMUOrientationEstimator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (38 loc) · 1.13 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
cmake_minimum_required(VERSION 2.8.3)
project(IMUOrientationEstimator)
# Set C++14
add_compile_options(-std=c++14)
# Release mode.
set(CMAKE_BUILD_TYPE Release)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
include_directories(include)
add_library(${PROJECT_NAME} SHARED
src/Initializer.cpp
src/Propagator.cpp
src/Updater.cpp
src/Estimator.cpp
)
target_link_libraries(${PROJECT_NAME} ${EIGEN3_LIBS})
option(BUILD_EXAMPLE "Build example code" ON)
if (BUILD_EXAMPLE)
find_package(OpenCV 4 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
# ROSBAG
find_package(catkin REQUIRED COMPONENTS
sensor_msgs
rosbag
)
include_directories(${catkin_INCLUDE_DIRS})
add_executable(RunRosbag example/RunRosbag.cpp)
target_link_libraries(RunRosbag
${catkin_LIBRARIES}
${PROJECT_NAME}
${OpenCV_LIBS}
)
# MYNTEYE
find_package(mynteye REQUIRED)
message(STATUS "Found mynteye: ${mynteye_VERSION}")
add_executable(RunMyntEye example/RunMyntEye.cpp)
target_link_libraries(RunMyntEye ${PROJECT_NAME} mynteye ${OpenCV_LIBS})
endif()