This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
145 lines (118 loc) · 4.06 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
cmake_minimum_required(VERSION 2.8.3)
project(triplet_graph)
find_package(catkin REQUIRED COMPONENTS
roscpp
tf
geolib2
tue_config
rviz
message_generation
)
# find_package(Boost REQUIRED COMPONENTS system program_options)
# find_package(PCL REQUIRED)
# find_package(OpenCV REQUIRED)
# ------------------------------------------------------------------------------------------------
# ROS MESSAGES AND SERVICES
# ------------------------------------------------------------------------------------------------
# Generate messages
# add_message_files(
# FILES
# message1.msg
# ...
# )
# Generate services
add_service_files(
FILES
Nodes.srv
)
# Generate added messages and services with any dependencies listed here
generate_messages()
# ------------------------------------------------------------------------------------------------
# CATKIN EXPORT
# ------------------------------------------------------------------------------------------------
catkin_package(
INCLUDE_DIRS include
LIBRARIES triplet_graph
CATKIN_DEPENDS geolib2 tf tue_config message_runtime
# DEPENDS system_lib
)
# ------------------------------------------------------------------------------------------------
# BUILD
# ------------------------------------------------------------------------------------------------
include_directories(
include
${catkin_INCLUDE_DIRS}
)
## BEGIN_TUTORIAL
## This plugin includes Qt widgets, so we must include Qt like so:
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
## I prefer the Qt signals and slots to avoid defining "emit", "slots",
## etc because they can conflict with boost signals, so define QT_NO_KEYWORDS here.
add_definitions(-DQT_NO_KEYWORDS)
## Here we specify which header files need to be run through "moc",
## Qt's meta-object compiler.
#qt4_wrap_cpp(MOC_FILES
# include/triplet_graph/tools/rviz_tool.h
#)
## Here we specify the list of source files, including the output of
## the previous command which is stored in ``${MOC_FILES}``.
set(SOURCE_FILES
tools/rviz_tool.cpp
include/triplet_graph/tools/moc_rviz_tool.cxx
)
## An rviz plugin is just a shared library, so here we declare the
## library to be called ``${PROJECT_NAME}`` (which is
## "rviz_plugin_tutorials", or whatever your version of this project
## is called) and specify the list of source files we collected above
## in ``${SOURCE_FILES}``.
add_library(triplet_graph_tools ${SOURCE_FILES})
## Link the library with whatever Qt libraries have been defined by
## the ``find_package(Qt4 ...)`` line above, and with whatever libraries
## catkin has included.
##
## Although this puts "rviz_plugin_tutorials" (or whatever you have
## called the project) as the name of the library, cmake knows it is a
## library and names the actual file something like
## "librviz_plugin_tutorials.so", or whatever is appropriate for your
## particular OS.
target_link_libraries(triplet_graph_tools ${QT_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(triplet_graph_tools ${PROJECT_NAME}_gencpp)
## END_TUTORIAL
file(GLOB_RECURSE HEADER_FILES include/*.h)
# add_library(library_name
# src/lib_source_file1.cpp
# ...
# )
# target_link_libraries(library_name ${catkin_LIBRARIES})
add_library(triplet_graph
# src/IncompleteRelation.cpp
src/Path.cpp
src/Measurement.cpp
src/Visualizer.cpp
src/Node.cpp
src/Edge2.cpp
src/Graph.cpp
src/PathFinder.cpp
src/graph_operations.cpp
src/CornerDetector.cpp
src/OdomTracker.cpp
src/Associator.cpp
src/NearestNeighborPC.cpp
src/EdgeTensionPC.cpp
src/Server.cpp
src/OdomModel.cpp
${HEADER_FILES}
)
target_link_libraries(triplet_graph
${catkin_LIBRARIES}
)
add_dependencies(triplet_graph ${PROJECT_NAME}_gencpp)
add_executable(mapping
src/mapping.cpp
)
target_link_libraries(mapping triplet_graph ${catkin_LIBRARIES})
add_executable(localization
src/localization.cpp
)
target_link_libraries(localization triplet_graph ${catkin_LIBRARIES})