forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (59 loc) · 2 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
cmake_minimum_required(VERSION 3.14)
project(autoware_dummy_perception_publisher)
find_package(autoware_cmake REQUIRED)
autoware_package()
# See ndt_omp package for documentation on why PCL is special
find_package(PCL REQUIRED COMPONENTS common filters)
set(${PROJECT_NAME}_DEPENDENCIES
autoware_perception_msgs
tier4_perception_msgs
pcl_conversions
rclcpp
sensor_msgs
std_msgs
tf2
tf2_geometry_msgs
tf2_ros
)
ament_auto_add_library(signed_distance_function SHARED
src/signed_distance_function.cpp
)
ament_auto_add_executable(${PROJECT_NAME}_node
src/main.cpp
src/node.cpp
src/pointcloud_creator.cpp
)
target_link_libraries(${PROJECT_NAME}_node
signed_distance_function
)
ament_target_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_DEPENDENCIES})
target_include_directories(${PROJECT_NAME}_node
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
# PCL dependencies - `ament_target_dependencies` doesn't respect the
# components/modules selected above and only links in `common` ,so we need
# to do this manually.
target_compile_definitions(${PROJECT_NAME}_node PRIVATE ${PCL_DEFINITIONS})
target_include_directories(${PROJECT_NAME}_node PRIVATE ${PCL_INCLUDE_DIRS})
# Unfortunately, this one can't be PRIVATE because only the plain or only the
# keyword (PRIVATE) signature of target_link_libraries can be used for one
# target, not both. The plain signature is already used inside
# `ament_target_dependencies` and possibly rosidl_target_interfaces.
target_link_libraries(${PROJECT_NAME}_node ${PCL_LIBRARIES})
target_link_directories(${PROJECT_NAME}_node PRIVATE ${PCL_LIBRARY_DIRS})
ament_auto_add_executable(empty_objects_publisher
src/empty_objects_publisher.cpp
)
if(BUILD_TESTING)
ament_add_ros_isolated_gtest(signed_distance_function-test
test/src/test_signed_distance_function.cpp
)
target_link_libraries(signed_distance_function-test
signed_distance_function
)
endif()
ament_auto_package(
INSTALL_TO_SHARE
launch
)