-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
76 lines (61 loc) · 1.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 2.8.8)
project(camera_imu_calibration)
set(CMAKE_CXX_STANDARD 14)
find_package(catkin QUIET COMPONENTS
roscpp
rosbag
std_msgs
geometry_msgs
sensor_msgs
nav_msgs
tf
imuPacket
cv_bridge
)
# Include libraries
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time)
# Describe catkin project
if (catkin_FOUND)
add_definitions(-DROS_AVAILABLE=1)
catkin_package(
CATKIN_DEPENDS roscpp rosbag tf std_msgs geometry_msgs sensor_msgs nav_msgs imuPacket
INCLUDE_DIRS src
LIBRARIES camimucalib_lib
)
else()
message(WARNING "CATKIN NOT FOUND BUILDING WITHOUT ROS!")
endif()
# Include our header files
include_directories(
src
${EIGEN3_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
# Set link libraries used by all binaries
list(APPEND thirdparty_libraries
${Boost_LIBRARIES}
${OpenCV_LIBRARIES}
${catkin_LIBRARIES}
)
##################################################
# Make the core library
##################################################
add_library(camimucalib_lib SHARED
src/init/InertialInitializer.cpp
src/state/State.cpp
src/state/StateHelper.cpp
src/state/Propagator.cpp
src/track/cameraPoseTracking.cpp
src/update/UpdaterCameraTracking.cpp
src/core/camimucalibManager.cpp)
target_link_libraries(camimucalib_lib ${thirdparty_libraries})
target_include_directories(camimucalib_lib PUBLIC src)
##################################################
# Adding different executables
##################################################
add_executable(ros_test_node src/ros_camimucalib_test.cpp)
target_link_libraries(ros_test_node camimucalib_lib ${catkin_LIBRARIES})