forked from sarthou/ar_track_alvar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
161 lines (136 loc) · 4.4 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(ar_track_alvar)
#add_compile_options(-std=gnu++11)
set(MSG_DEPS
std_msgs
sensor_msgs
geometry_msgs
visualization_msgs)
find_package(catkin COMPONENTS
genmsg
roscpp
tf
tf2
image_transport
resource_retriever
cv_bridge
pcl_ros
pcl_conversions
std_msgs
message_generation
${MSG_DEPS}
dynamic_reconfigure
cmake_modules
ar_track_alvar_bundles
REQUIRED)
find_package(Eigen REQUIRED)
find_package(OpenCV REQUIRED)
find_package(TinyXML REQUIRED)
add_service_files(DIRECTORY srv
FILES
GetPositionAndOrientation.srv
SetCamTopic.srv
standard_service.srv
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
visualization_msgs
)
# dynamic reconfigure support
generate_dynamic_reconfigure_options(cfg/Params.cfg)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ar_track_alvar
CATKIN_DEPENDS
std_msgs
roscpp
tf
tf2
message_runtime
image_transport
sensor_msgs
geometry_msgs
visualization_msgs
resource_retriever
cv_bridge
pcl_ros
pcl_conversions
dynamic_reconfigure
)
include_directories(include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${TinyXML_INCLUDE_DIRS}
)
set(GENCPP_DEPS ar_track_alvar_msgs_gencpp std_msgs_gencpp sensor_msgs_gencpp geometry_msgs_gencpp visualization_msgs_gencpp)
add_library(ar_track_alvar
src/Camera.cpp
src/CaptureDevice.cpp
src/Pose.cpp
src/Marker.cpp
src/MarkerDetector.cpp
src/Bitset.cpp
src/Rotation.cpp
src/CvTestbed.cpp
src/CaptureDevice.cpp
src/CaptureFactory.cpp
src/CaptureFactory_unix.cpp
src/FileFormatUtils.cpp
src/Threads.cpp
src/Threads_unix.cpp
src/Mutex.cpp
src/Mutex_unix.cpp
src/ConnectedComponents.cpp
src/Line.cpp src/Plugin.cpp
src/Plugin_unix.cpp
src/DirectoryIterator.cpp
src/DirectoryIterator_unix.cpp
src/Draw.cpp
src/Util.cpp
src/Filter.cpp
src/Kalman.cpp
src/kinect_filtering.cpp
src/Optimization.cpp
src/MultiMarker.cpp
src/MultiMarkerBundle.cpp
src/MultiMarkerInitializer.cpp
src/color.cpp)
target_link_libraries(ar_track_alvar ${OpenCV_LIBS} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(ar_track_alvar ${GENCPP_DEPS})
# Kinect filtering code
set(KINECT_FILTERING_TARGETS kinect_filtering medianFilter)
add_library(kinect_filtering src/kinect_filtering.cpp)
target_link_libraries(kinect_filtering ${catkin_LIBRARIES})
add_dependencies(kinect_filtering ${GENCPP_DEPS})
add_library(medianFilter src/medianFilter.cpp)
target_link_libraries(medianFilter ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(medianFilter ${GENCPP_DEPS})
set(ALVAR_TARGETS ar_track_alvar individualMarkersNoKinect findMarkerBundlesNoKinect createMarker ar_track_alvar)
add_executable(individualMarkersNoKinect nodes/IndividualMarkersNoKinect.cpp)
target_link_libraries(individualMarkersNoKinect ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(individualMarkersNoKinect ${PROJECT_NAME}_gencpp ${GENCPP_DEPS})
add_executable(findMarkerBundlesNoKinect nodes/FindMarkerBundlesNoKinect.cpp)
target_link_libraries(findMarkerBundlesNoKinect ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(findMarkerBundlesNoKinect ${PROJECT_NAME}_gencpp ${GENCPP_DEPS})
add_executable(createMarker src/SampleMarkerCreator.cpp)
target_link_libraries(createMarker ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(createMarker ${PROJECT_NAME}_gencpp ${GENCPP_DEPS})
add_executable(createFlag src/SampleFlagCreator.cpp)
target_link_libraries(createFlag ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(createFlag ${PROJECT_NAME}_gencpp ${GENCPP_DEPS})
add_executable(createCube src/SampleCubeCreator.cpp)
target_link_libraries(createCube ar_track_alvar ${catkin_LIBRARIES})
add_dependencies(createCube ${PROJECT_NAME}_gencpp ${GENCPP_DEPS})
install(TARGETS ${ALVAR_TARGETS} ${KINECT_FILTERING_TARGETS}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)