forked from ifm/ifm3d-ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
118 lines (100 loc) · 2.24 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
cmake_minimum_required(VERSION 3.5)
project(ifm3d)
find_package(ifm3d 0.11.2 CONFIG REQUIRED COMPONENTS
camera
framegrabber
image
)
find_package(catkin REQUIRED COMPONENTS
rospy
image_transport
pcl_ros
cv_bridge
nodelet
roscpp
sensor_msgs
std_msgs
tf
message_generation
message_runtime
rostest
)
catkin_python_setup()
#######################################
## Declare ROS messages and services ##
#######################################
add_message_files(
FILES
Extrinsics.msg
)
add_service_files(
FILES
Dump.srv
Config.srv
Trigger.srv
SoftOff.srv
SoftOn.srv
SyncClocks.srv
)
generate_messages(
DEPENDENCIES
std_msgs
)
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
LIBRARIES ifm3d_ros
CATKIN_DEPENDS roscpp nodelet
)
#############
## Build ##
#############
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED true)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_library(ifm3d_ros src/camera_nodelet.cpp)
target_link_libraries(ifm3d_ros
${catkin_LIBRARIES}
ifm3d::camera
ifm3d::framegrabber
ifm3d::image
)
add_dependencies(ifm3d_ros ${PROJECT_NAME}_generate_messages_cpp)
#############
## Install ##
#############
catkin_install_python(
PROGRAMS
bin/dump
bin/config
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(TARGETS
ifm3d_ros
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(FILES nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
######################
## Node-level tests ##
######################
if (CATKIN_ENABLE_TESTING)
add_rostest(test/ifm3d.test)
catkin_add_nosetests(test)
endif()