-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (37 loc) · 1.23 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
cmake_minimum_required(VERSION 2.8.3)
project(demo)
add_compile_options(-std=c++11)
find_package(Boost REQUIRED COMPONENTS date_time thread)
find_package(catkin REQUIRED COMPONENTS message_generation rostime roscpp rosconsole roscpp_serialization
sensor_msgs
image_transport
cv_bridge)
find_package(OpenCV 3.3.1 REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)
include_directories(${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
# add_service_files(DIRECTORY srv FILES TwoInts.srv)
# generate_messages(DEPENDENCIES std_msgs)
catkin_package(CATKIN_DEPENDS message_runtime std_msgs)
macro(rosflyvision T)
FILE(GLOB_RECURSE sourcefiles "${T}/*.cpp")
add_executable(${T} ${sourcefiles})
target_link_libraries(${T} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBS} ${Boost_LIBRARIES})
add_dependencies(${T} roscpp_tutorials_gencpp)
install(TARGETS ${T}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
endmacro()
foreach(dir
web_cam
kcf_tracker
add_memery
GroundStation
)
rosflyvision(${dir})
endforeach()
target_link_libraries(add_memery
${catkin_LIBRARIES} -lrt -DBUILD_TESTS=OFF
)
target_link_libraries(kcf_tracker
${catkin_LIBRARIES} -lrt -DBUILD_TESTS=OFF
)