-
Notifications
You must be signed in to change notification settings - Fork 284
/
CMakeLists.txt
84 lines (67 loc) · 2.35 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 2.8.3)
project(vins_estimator)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED)
find_package(Pangolin REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
message(WARNING "OpenCV_VERSION: ${OpenCV_VERSION}")
include_directories(
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${CERES_INCLUDE_DIRS}
${Pangolin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
add_library(camera_model SHARED
src/camera_models/chessboard/Chessboard.cc
src/camera_models/calib/CameraCalibration.cc
src/camera_models/camera_models/Camera.cc
src/camera_models/camera_models/CameraFactory.cc
src/camera_models/camera_models/CostFunctionFactory.cc
src/camera_models/camera_models/PinholeCamera.cc
src/camera_models/camera_models/CataCamera.cc
src/camera_models/camera_models/EquidistantCamera.cc
src/camera_models/camera_models/ScaramuzzaCamera.cc
src/camera_models/sparse_graph/Transform.cc
src/camera_models/gpl/gpl.cc
src/camera_models/gpl/EigenQuaternionParameterization.cc)
target_link_libraries(camera_model ${Boost_LIBRARIES} ${OpenCV_LIBS} ${CERES_LIBRARIES})
ADD_LIBRARY(MyVio SHARED
src/System.cpp
src/parameters.cpp
src/estimator.cpp
src/feature_manager.cpp
src/feature_tracker.cpp
src/utility/utility.cpp
src/initial/solve_5pts.cpp
src/initial/initial_aligment.cpp
src/initial/initial_sfm.cpp
src/initial/initial_ex_rotation.cpp
src/backend/vertex.cc
src/backend/edge.cc
src/backend/problem.cc
src/backend/vertex_pose.cc
src/backend/edge_reprojection.cc
src/backend/edge_imu.cc
src/backend/edge_prior.cpp
src/backend/loss_function.cc
src/backend/imu_integration.cc
)
target_link_libraries(MyVio
${OpenCV_LIBS}
${CERES_LIBRARIES}
${Pangolin_LIBRARIES}
camera_model)
add_executable(run_euroc test/run_euroc.cpp)
target_link_libraries(run_euroc
MyVio
-lpthread)
add_executable(testCurveFitting test/CurveFitting.cpp)
target_link_libraries(testCurveFitting MyVio)