-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
62 lines (51 loc) · 1.66 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
cmake_minimum_required(VERSION 3.0.2)
project(opencv_services)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
cv_bridge
image_transport
tf2_ros
message_generation
)
find_package(OpenCV 3 REQUIRED)
## Generate services in the 'srv' folder
add_service_files(
FILES
box_and_target_position.srv
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
geometry_msgs
)
catkin_package(
INCLUDE_DIRS
CATKIN_DEPENDS roscpp
sensor_msgs
std_msgs
cv_bridge
image_transport
tf2_ros
message_runtime
)
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(opencv_extract_object_positions src/opencv_extract_object_positions.cpp)
add_dependencies(opencv_extract_object_positions opencv_services_generate_messages_cpp)
## Specify libraries to link a library or executable target against
target_link_libraries(opencv_extract_object_positions ${catkin_LIBRARIES} ${OpenCV_LIBS})