-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (51 loc) · 1.29 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
cmake_minimum_required( VERSION 2.8 )
project(opencv_exp)
set(CMAKE_EXPORT_COMPILE_COMMANDS Yes)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -O3 -fopenmp -pthread")
set(CMAKE_BUILD_TYPE Release)
find_package(OpenCV 4.5 REQUIRED PATHS /opt/opencv-4.5.5/lib/cmake/opencv4)
find_package(Eigen3 3.3 REQUIRED PATHS /opt/eigen3.3.4/share/eigen3/cmake)
find_package(Sophus REQUIRED PATHS /opt/sophus/share/sophus/cmake)
find_package(Pangolin REQUIRED PATHS /opt/pangolin/lib/cmake/Pangolin)
find_package(g2o 1.0.0 REQUIRED PATHS /opt/g2o/lib/cmake/g2o)
include_directories(include)
add_library(base_slam SHARED
src/frame.cpp
src/feature.cpp
src/camera.cpp
src/map.cpp
src/mappoint.cpp
src/frontend.cpp
src/viewer.cpp
src/backend.cpp
src/dataset.cpp
src/visual_odom.cpp
src/config.cpp
)
add_executable(vo_app
app/main.cpp
)
target_link_libraries(base_slam
Eigen3::Eigen
Sophus::Sophus
g2o::core
g2o::stuff
g2o::csparse_extension
g2o::solver_csparse
${OpenCV_LIBRARIES}
${Pangolin_LIBRARIES} GL GLU GLEW glut
pthread
)
target_link_libraries(vo_app
Eigen3::Eigen
Sophus::Sophus
g2o::core
g2o::stuff
g2o::csparse_extension
g2o::solver_csparse
${OpenCV_LIBRARIES}
${Pangolin_LIBRARIES} GL GLU GLEW glut
pthread
base_slam
)