-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
56 lines (41 loc) · 2.51 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
cmake_minimum_required(VERSION 2.8)
project(unreal_camera_info_pub)
find_package(catkin REQUIRED COMPONENTS cv_bridge image_transport sensor_msgs roscpp camera_info_manager std_msgs)
catkin_package(CATKIN_DEPENDS cv_bridge image_transport sensor_msgs camera_info_manager std_msgs)
find_package(OpenCV)
include_directories(include ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
# add the publisher example
add_executable(my_publisher src/my_publisher.cpp)
add_dependencies(my_publisher ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(my_publisher ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# add the subscriber example
add_executable(my_subscriber src/my_subscriber.cpp)
add_dependencies(my_subscriber ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(my_subscriber ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# add the cv editing example
add_executable(image_converter src/image_converter.cpp)
add_dependencies(image_converter ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(image_converter ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# add the camera info publisher
add_executable(camera_info_publisher src/camera_info_publisher.cpp)
add_dependencies(camera_info_publisher ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(camera_info_publisher ${catkin_LIBRARIES})
# ${OpenCV_LIBRARIES})
# camera info publisher rgbd
add_executable(camera_info_publisher_rgbd src/camera_info_publisher_rgbd.cpp)
add_dependencies(camera_info_publisher_rgbd ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(camera_info_publisher_rgbd ${catkin_LIBRARIES})
# Depth image republisher
add_executable(depth_image_republisher src/depth_image_republish.cpp)
add_dependencies(depth_image_republisher ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(depth_image_republisher ${catkin_LIBRARIES})
# Depth image viewer
add_executable(depth_image_viewer src/image_viewer.cpp)
add_dependencies(depth_image_viewer ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(depth_image_viewer ${catkin_LIBRARIES})
# Mark executables and/or libraries for installation
install(TARGETS my_publisher my_subscriber image_converter camera_info_publisher camera_info_publisher_rgbd
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)