-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
126 lines (106 loc) · 3.53 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
cmake_minimum_required(VERSION 2.8)
project(mmf_writer)
find_package(catkin REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(catkin REQUIRED
message_generation
cv_bridge
dynamic_reconfigure
image_geometry
image_transport
nodelet
roscpp
std_msgs
sensor_msgs
genmsg
actionlib_msgs
actionlib)
find_package(OpenCV REQUIRED)
if (OpenCV_VERSION VERSION_EQUAL "3")
add_definitions("-DOPENCV3=1")
endif()
find_package(Boost REQUIRED COMPONENTS thread)
# Dynamic reconfigure support
generate_dynamic_reconfigure_options(cfg/ProcessImage.cfg)
add_message_files(
FILES
RecordingStatus.msg
RecorderSettings.msg
)
add_action_files(
DIRECTORY action
FILES
Record.action
)
generate_messages(
DEPENDENCIES
std_msgs
actionlib_msgs
)
catkin_package(
CATKIN_DEPENDS image_geometry roscpp sensor_msgs message_runtime image_transport
DEPENDS OpenCV
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
)
include_directories(SYSTEM ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
include_directories(include)
add_library(${PROJECT_NAME}
src/nodelets/process_image.cpp
src/nodelets/mmfWriter_nodelet.cpp
src/nodelets/mmfWriter.cpp
src/libmmf_writer/advertisement_checker.cpp
src/libmmf_writer/StaticBackgroundCompressor.cpp
src/libmmf_writer/BackgroundRemovedImage.cpp
src/libmmf_writer/IplImageLoaderFixedWidth.cpp
src/libmmf_writer/BackgroundRemovedImageLoader.cpp
src/libmmf_writer/ImageMetaDataLoader.cpp
src/libmmf_writer/NameValueMetaData.cpp
src/libmmf_writer/CompositeImageMetaData.cpp
src/libmmf_writer/LinearStackCompressor.cpp
src/libmmf_writer/Timer.cpp
src/libmmf_writer/StackReader.cpp
src/libmmf_writer/ExtraDataWriter.cpp
src/libmmf_writer/StaticBackgroundCompressorLoader.cpp
src/libmmf_writer/ThreadedStaticBackgroundCompressor.cpp
src/libmmf_writer/ThreadedLinearStackCompressor.cpp
src/libmmf_writer/RecordingActionServer.cpp
)
# make sure configure headers are built before any node using them
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBRARIES})
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(FILES nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# add the publisher example
#add_executable(my_publisher2 src/nodes/my_publisher.cpp)
#target_link_libraries(my_publisher2 ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# add the publisher example
#add_executable(my_publisher src/nodes/my_publisher.cpp)
#target_link_libraries(my_publisher ${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
# Standalone node
add_executable(mmf_writer_exe src/nodes/mmf_writer.cpp)
target_link_libraries(mmf_writer_exe ${PROJECT_NAME} ${Boost_LIBRARIES} ${OpenCV_LIBRARIES})
SET_TARGET_PROPERTIES(mmf_writer_exe PROPERTIES OUTPUT_NAME mmf_writer)
install(TARGETS mmf_writer_exe
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
add_executable(my_publisher_exe src/nodes/my_publisher.cpp)
target_link_libraries(my_publisher_exe ${PROJECT_NAME} ${Boost_LIBRARIES} ${OpenCV_LIBRARIES})
SET_TARGET_PROPERTIES(my_publisher_exe PROPERTIES OUTPUT_NAME my_publisher)
install(TARGETS my_publisher_exe
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# install the launch file
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/
)
if(CATKIN_ENABLE_TESTING)
add_subdirectory(test)
endif()