-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
106 lines (87 loc) · 2.64 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
#License: BSD
cmake_minimum_required(VERSION 3.5.1)
project(automated_driving_msgs)
find_package(ros_environment REQUIRED QUIET)
set(ROS_VERSION $ENV{ROS_VERSION})
if(${ROS_VERSION} EQUAL 2)
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(shape_msgs REQUIRED)
find_package(std_msgs REQUIRED)
ament_export_dependencies(
geometry_msgs
shape_msgs
std_msgs
)
set(DURATION_TYPE "builtin_interfaces/Duration")
configure_file(msg/DeltaPoseWithDeltaTime.msg.in msg/DeltaPoseWithDeltaTime.msg @ONLY)
set(msg_files
"msg/AdditionalHeaderForCommunication.msg"
"msg/BasicSafetyMessage.msg"
"msg/ClassWithProbability.msg"
"${CMAKE_BINARY_DIR}:msg/DeltaPoseWithDeltaTime.msg"
"msg/DeltaTrajectory.msg"
"msg/MotionPrediction.msg"
"msg/MotionState.msg"
"msg/ObjectClassification.msg"
"msg/ObjectState.msg"
"msg/ObjectStateArray.msg"
"msg/StampedFloat64.msg"
"msg/Trajectory.msg"
)
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
DEPENDENCIES
geometry_msgs
shape_msgs
std_msgs
)
ament_package()
elseif(${ROS_VERSION} EQUAL 1)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
message_generation
shape_msgs
std_msgs
)
set(DURATION_TYPE "duration")
configure_file(msg/DeltaPoseWithDeltaTime.msg.in msg/DeltaPoseWithDeltaTime.msg @ONLY)
add_message_files(
DIRECTORY "${CMAKE_BINARY_DIR}/msg"
FILES "DeltaPoseWithDeltaTime.msg"
NOINSTALL
)
add_message_files(
DIRECTORY msg
FILES
"AdditionalHeaderForCommunication.msg"
"BasicSafetyMessage.msg"
"ClassWithProbability.msg"
"DeltaTrajectory.msg"
"MotionPrediction.msg"
"MotionState.msg"
"ObjectClassification.msg"
"ObjectState.msg"
"ObjectStateArray.msg"
"StampedFloat64.msg"
"Trajectory.msg"
)
generate_messages(DEPENDENCIES
geometry_msgs
shape_msgs
std_msgs
)
catkin_package(CATKIN_DEPENDS
geometry_msgs
message_runtime
shape_msgs
std_msgs
)
install(
FILES "${CMAKE_BINARY_DIR}/msg/DeltaPoseWithDeltaTime.msg"
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/msg
)
else()
message(FATAL_ERROR "Unsupported ROS version detected: ROS_VERSION ${ROS_VERSION}. Only ROS_VERSION 1 and 2 are supported.")
endif()