forked from ros-perception/image_pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
90 lines (75 loc) · 2.98 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
cmake_minimum_required(VERSION 2.8)
project(image_view)
find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs)
generate_dynamic_reconfigure_options(cfg/ImageView.cfg)
catkin_package(CATKIN_DEPENDS dynamic_reconfigure)
find_package(Boost REQUIRED COMPONENTS thread)
find_package(OpenCV REQUIRED)
include_directories(${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
# Extra tools
add_executable(extract_images src/nodes/extract_images.cpp)
target_link_libraries(extract_images ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(image_saver src/nodes/image_saver.cpp)
target_link_libraries(image_saver ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(video_recorder src/nodes/video_recorder.cpp)
target_link_libraries(video_recorder ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
install(TARGETS extract_images image_saver video_recorder
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# Deal with the GUI's
if(ANDROID)
return()
endif()
find_package(GTK2)
add_definitions(-DHAVE_GTK)
include_directories(${GTK2_INCLUDE_DIRS})
# Nodelet library
add_library(image_view src/nodelets/image_nodelet.cpp src/nodelets/disparity_nodelet.cpp src/nodelets/window_thread.cpp)
target_link_libraries(image_view ${catkin_LIBRARIES}
${GTK_LIBRARIES}
${GTK2_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES}
)
install(TARGETS image_view
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
# Image viewers
add_executable(image_view_exe src/nodes/image_view.cpp)
add_dependencies(image_view_exe ${PROJECT_NAME}_gencfg)
SET_TARGET_PROPERTIES(image_view_exe PROPERTIES OUTPUT_NAME image_view)
target_link_libraries(image_view_exe ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES}
)
add_executable(disparity_view src/nodes/disparity_view.cpp)
target_link_libraries(disparity_view ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(stereo_view src/nodes/stereo_view.cpp)
target_link_libraries(stereo_view ${Boost_LIBRARIES}
${catkin_LIBRARIES}
${GTK_LIBRARIES}
${GTK2_LIBRARIES}
${OpenCV_LIBRARIES}
)
install(TARGETS disparity_view image_view_exe stereo_view
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# Python programs
catkin_install_python(
PROGRAMS scripts/extract_images_sync
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)