-
Notifications
You must be signed in to change notification settings - Fork 23
/
CMakeLists.txt
162 lines (138 loc) · 4.07 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
cmake_minimum_required(VERSION 2.8.3)
project(dbot_ros)
############################
# Flags #
############################
# Enable c++11 GCC 4.6 or greater required
add_definitions(-std=c++11)
add_definitions(-DPROFILING_ON=1 -fPIC) #print profiling output
############################
# Library Version #
############################
#include(cmake/version.cmake)
############################
# Library info summary #
############################
#include(cmake/info.cmake)
#info_begin()
# info_project("::bot::dbot_ros:: dbot Tracker ROS Pkg" ${PROJECT_VERSION})
#info_end()
############################
# Setup #
############################
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(dbot_ros_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/source)
############################
# Dependencies #
############################
find_package(catkin REQUIRED
roscpp
roslib
sensor_msgs
std_msgs
geometry_msgs
cv_bridge
rosbag
image_transport
fl
dbot
dbot_ros_msgs
interactive_markers
)
set(PROJECT_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_MODULE_PATH ${PROJECT_MODULE_PATH})
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
find_package(Eigen3 3.2 EXACT REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
# find_package(OpenCV REQUIRED)
# include_directories(${OpenCV_INCLUDE_DIRS})
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS
source
${dbot_ros_INCLUDE_DIRS}
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
roslib
sensor_msgs
std_msgs
geometry_msgs
cv_bridge
message_filters
image_transport
fl
dbot
dbot_ros_msgs
interactive_markers
)
###########
## Build ##
###########
include_directories(${dbot_ros_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
set(dbot_ros_SOURCE_DIR source/${PROJECT_NAME})
set(dbot_ros_SOURCES
source/${PROJECT_NAME}/object_tracker_ros.cpp
source/${PROJECT_NAME}/object_tracker_publisher.cpp
source/${PROJECT_NAME}/util/ros_camera_data_provider.cpp
source/${PROJECT_NAME}/util/ros_interface.cpp
# we do not build the following two sources for now, because we
# have compilation issues and we don't need this functionality currently
# source/${PROJECT_NAME}/util/data_set_camera_data_provider.cpp
# source/${PROJECT_NAME}/util/tracking_dataset.cpp
source/${PROJECT_NAME}/util/interactive_marker_initializer.cpp)
add_library(${PROJECT_NAME}
${dbot_ros_SOURCES})
add_dependencies(${PROJECT_NAME}
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
)
add_executable(particle_tracker
source/${PROJECT_NAME}/tracker/particle_tracker_node.cpp)
add_dependencies(particle_tracker
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(particle_tracker
${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
yaml-cpp)
add_executable(gaussian_tracker
source/${PROJECT_NAME}/tracker/gaussian_tracker_node.cpp)
add_dependencies(gaussian_tracker
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(gaussian_tracker
${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
yaml-cpp)
add_executable(object_tracker_service
source/${PROJECT_NAME}/tracker/object_tracker_service_node.cpp)
add_dependencies(object_tracker_service
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(object_tracker_service
${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
yaml-cpp)
add_executable(object_tracker_controller_service
source/${PROJECT_NAME}/object_tracker_controller_service_node.cpp)
add_dependencies(object_tracker_controller_service
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(object_tracker_controller_service
${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
yaml-cpp)
add_executable(
interactive_markers_initializer_node
source/${PROJECT_NAME}/interactive_markers_initializer_node_main.cpp)
target_link_libraries(
interactive_markers_initializer_node
${PROJECT_NAME}
${catkin_LIBRARIES}
)