forked from gogojjh/M-LOAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
98 lines (85 loc) · 2.69 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
86
87
88
89
90
91
92
93
94
95
96
97
98
cmake_minimum_required(VERSION 2.8.3)
project(mloam_loop)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -fPIC")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(catkin REQUIRED COMPONENTS
tf
roscpp
std_msgs
nav_msgs
sensor_msgs
geometry_msgs
cv_bridge
image_transport
message_generation
mloam_common
mloam_msgs
)
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)
find_package(Ceres REQUIRED)
find_package(Gflags REQUIRED)
find_package(Glog REQUIRED)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(Eigen3)
include_directories(
include
${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ${PCL_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS mloam_common mloam_msgs
DEPENDS PCL
)
#add_executable(loop_fusion_node
# src/pose_graph_node.cpp
# src/pose_graph.cpp
# src/keyframe.cpp
# src/utility/CameraPoseVisualization.cpp
# src/ThirdParty/DBoW/BowVector.cpp
# src/ThirdParty/DBoW/FBrief.cpp
# src/ThirdParty/DBoW/FeatureVector.cpp
# src/ThirdParty/DBoW/QueryResults.cpp
# src/ThirdParty/DBoW/ScoringObject.cpp
# src/ThirdParty/DUtils/Random.cpp
# src/ThirdParty/DUtils/Timestamp.cpp
# src/ThirdParty/DVision/BRIEF.cpp
# src/ThirdParty/VocabularyBinary.cpp
# )
#
#target_link_libraries(loop_fusion_node ${catkin_LIBRARIES} ${OpenCV_LIBS} ${CERES_LIBRARIES})
add_executable(loop_closure_node
src/loop_closure_node.cpp
src/pose_graph.cpp
src/keyframe.cpp
src/scan_context.cpp
src/loop_registration.cpp
src/utility/feature_extract.cpp
src/utility/pose.cpp
src/utility/CameraPoseVisualization.cpp
src/factor/pose_local_parameterization.cpp
ThirdParty/FastGlobalRegistration/app.cpp
)
target_link_libraries(loop_closure_node
${catkin_LIBRARIES} ${OpenCV_LIBS} ${PCL_LIBRARIES} ${CERES_LIBRARIES}
${GFLAGS_LIBRARIES} ${GLOG_LIBRARIES}
)
########################################### TEST ################
add_executable(test_generate_data test/test_generate_data.cpp)
target_link_libraries(test_generate_data ${PCL_LIBRARIES})
add_executable(test_icp
test/test_icp.cpp
src/utility/pose.cpp
src/factor/pose_local_parameterization.cpp
src/factor/impl_loss_function.cpp
)
target_link_libraries(test_icp ${PCL_LIBRARIES} ${CERES_LIBRARIES})
add_executable(test_fgr test/test_fgr.cpp ThirdParty/FastGlobalRegistration/app.cpp)
target_link_libraries(test_fgr ${PCL_LIBRARIES})
add_executable(test_registration_error test/test_registration_error.cpp)
target_link_libraries(test_registration_error ${PCL_LIBRARIES})