forked from usrl-uofsc/stag_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
145 lines (123 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
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
cmake_minimum_required(VERSION 3.0.0)
project(stag_ros)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++14)
set(CMAKE_BUILD_TYPE Release)
find_package(OpenCV REQUIRED)
find_package(PkgConfig REQUIRED)
################
# Dependencies #
################
find_package(catkin REQUIRED COMPONENTS
camera_info_manager
cv_bridge
geometry_msgs
image_transport
message_generation
nodelet
roscpp
sensor_msgs
std_msgs
tf
)
## Custom message files to be created
add_message_files(DIRECTORY msg
FILES
STagMarker.msg
STagMarkerArray.msg
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
INCLUDE_DIRS include src/stag
LIBRARIES stag_core
CATKIN_DEPENDS camera_info_manager cv_bridge geometry_msgs image_transport message_generation message_runtime nodelet roscpp sensor_msgs std_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
###########
## Build ##
###########
## Runnables
add_library(stag_core
src/stag/Decoder.cpp
src/stag/Drawer.cpp
src/stag/EDInterface.cpp
src/stag/Ellipse.cpp
src/stag/Marker.cpp
src/stag/PoseRefiner.cpp
src/stag/Quad.cpp
src/stag/QuadDetector.cpp
src/stag/Stag.cpp
src/stag/utility.cpp
src/stag/ED/ED.cpp
src/stag/ED/EDInternals.cpp
src/stag/ED/EDLines.cpp
src/stag/ED/GradientOperators.cpp
src/stag/ED/ImageSmooth.cpp
src/stag/ED/LineSegment.cpp
src/stag/ED/MyMath.cpp
src/stag/ED/NFA.cpp
src/stag/ED/ValidateEdgeSegments.cpp
)
add_library(stag_nodelet
src/stag_ros/stag_nodelet.cpp
)
add_executable(stag_node
src/stag_ros/stag_node.cpp
)
add_executable(stag_nodelet_runnable
src/stag_ros/stag_nodelet_main.cpp)
## Dependencies
add_dependencies(stag_nodelet
stag_ros_generate_messages_cpp
${catkin_EXPORTED_TARGETS}
)
add_dependencies(stag_node
stag_ros_generate_messages_cpp
${catkin_EXPORTED_TARGETS}
)
## Links
target_link_libraries(stag_core
${OpenCV_LIBS}
)
target_link_libraries(stag_nodelet
${catkin_LIBRARIES}
${OpenCV_LIBS}
stag_core
)
target_link_libraries(stag_nodelet_runnable
stag_nodelet
)
target_link_libraries(stag_node
${catkin_LIBRARIES}
${OpenCV_LIBS}
stag_core
)
###########
# INSTALL #
###########
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)
install(FILES stag_nodelet.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY cfg launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(TARGETS
stag_core
stag_node
stag_nodelet
stag_nodelet_runnable
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)