-
Notifications
You must be signed in to change notification settings - Fork 157
/
CMakeLists.txt
85 lines (76 loc) · 2.04 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
84
85
cmake_minimum_required(VERSION 2.8)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
project(larvio)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
#set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED)
find_package(Ceres REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(SuiteSparse REQUIRED)
find_package(Pangolin REQUIRED)
include_directories(
${PROJECT_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
${SUITESPARSE_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR}
${Pangolin_INCLUDE_DIRS}
)
# Image processor
add_library(image_processor
${PROJECT_SOURCE_DIR}/src/image_processor.cpp
${PROJECT_SOURCE_DIR}/src/ORBDescriptor.cpp
)
target_link_libraries(image_processor
${OpenCV_LIBRARIES}
)
# Initializer
# -- Static Initializer
add_library(staticInitializer
${PROJECT_SOURCE_DIR}/src/StaticInitializer.cpp
)
target_link_libraries(staticInitializer
${SUITESPARSE_LIBRARIES}
)
# -- Dynamic Initializer
add_library(dynamicInitializer
${PROJECT_SOURCE_DIR}/src/StaticInitializer.cpp
${PROJECT_SOURCE_DIR}/src/DynamicInitializer.cpp
${PROJECT_SOURCE_DIR}/src/feature_manager.cpp
${PROJECT_SOURCE_DIR}/src/initial_alignment.cpp
${PROJECT_SOURCE_DIR}/src/initial_sfm.cpp
${PROJECT_SOURCE_DIR}/src/solve_5pts.cpp
)
target_link_libraries(dynamicInitializer
${SUITESPARSE_LIBRARIES}
${CERES_LIBRARIES}
${OpenCV_LIBRARIES}
)
# -- Flexible Initializer
add_library(flexibleInitializer
${PROJECT_SOURCE_DIR}/src/FlexibleInitializer.cpp
)
target_link_libraries(flexibleInitializer
staticInitializer
dynamicInitializer
)
# Estimator
add_library(estimator
${PROJECT_SOURCE_DIR}/src/larvio.cpp
)
target_link_libraries(estimator
flexibleInitializer
${SUITESPARSE_LIBRARIES}
${OpenCV_LIBRARIES}
)
# App
add_executable(larvio app/larvioMain.cpp)
target_link_libraries(larvio
image_processor
estimator
${OpenCV_LIBS}
${Pangolin_LIBRARIES}
)