-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
124 lines (91 loc) · 2.49 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
cmake_minimum_required(VERSION 2.8.3)
project(solve_keyframe_pose_graph)
set( CMAKE_CXX_STANDARD 11 )
find_package(Threads)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
message_generation
image_transport
cv_bridge
#nap
#cerebro
nav_msgs
)
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake")
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED)
find_package(OpenCV 3 REQUIRED)
#find_package( ZLIB REQUIRED ) # Needed for cnpy (c++ support for writing .npy and .npz files). Remove this and in target if you dont need it.
set(CMAKE_BUILD_TYPE "Release")
#set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_BUILD_TYPE RelWithDebInfo)
set( CMAKE_CXX_FLAGS "-fpermissive -std=c++11 -O3" )
#-DEIGEN_USE_MKL_ALL")
add_message_files(
FILES
LoopEdge.msg
)
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
geometry_msgs
nav_msgs
#nap
#cerebro
)
catkin_package(
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime image_transport cv_bridge
#nap
#cerebro
)
include_directories(
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_executable( keyframe_pose_graph_slam
src/keyframe_pose_graph_slam_node.cpp
src/NodeDataManager.cpp
src/PoseGraphSLAM.cpp
src/VizPoseGraph.cpp
src/utils/PoseManipUtils.cpp
src/utils/RosMarkerUtils.cpp
src/utils/RawFileIO.cpp
src/Worlds.cpp
src/Composer.cpp
)
# this is needed to indicate this this executable depends on the messages of the pkg.
#add_dependencies(keyframe_pose_graph_slam cerebro_generate_messages_cpp)
#add_dependencies(keyframe_pose_graph_slam )
#add_executable( test_disjointset_imp src/test_disjointset.cpp )
#add_executable( test_bfs_imp src/test_bfs.cpp )
# Debug Node
#add_executable( debug_kf_slam_node
# src/debug_kf_slam_node.cpp
# src/NodeDataManager.cpp
# src/PoseGraphSLAM.cpp
# src/utils/PoseManipUtils.cpp
# src/utils/RosMarkerUtils.cpp
# src/cnpy/cnpy.cpp
# )
target_link_libraries( keyframe_pose_graph_slam
${OpenCV_LIBRARIES}
${catkin_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${CERES_LIBRARIES}
# ${ZLIB_LIBRARIES}
)
#target_link_libraries( test_disjointset_imp ${catkin_LIBRARIES} )
#target_link_libraries( test_bfs_imp ${catkin_LIBRARIES} )
#target_link_libraries( debug_kf_slam_node
# ${OpenCV_LIBRARIES}
# ${catkin_LIBRARIES}
# ${CMAKE_THREAD_LIBS_INIT}
# ${CERES_LIBRARIES}
# ${ZLIB_LIBRARIES}
#)