Skip to content

Commit 4a634cf

Browse files
authored
Use add-compile-definitions and more build refinements (#522)
1 parent 7c107f1 commit 4a634cf

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changelog
44

55
[UNRELEASED]
66
============
7-
* [BUGFIX]: Add the missing ament_cmake_gtest to the dependencies.
7+
* [BUGFIX]: Add the missing ``ament_cmake_gtest`` to the dependencies.
8+
* Use ``add_compile_definitions`` instead of ``add_definitions`` to set the ``EIGEN_MPL2_ONLY`` flag.
89

910
ouster_ros v0.14.0
1011
==================

ouster-ros/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ option(CMAKE_POSITION_INDEPENDENT_CODE "Build position independent code." ON)
4040
set(_ouster_ros_INCLUDE_DIRS
4141
include
4242
ouster-sdk/ouster_sensor/include
43-
ouster-sdk/ouster_client/include/optional-lite
43+
ouster-sdk/ouster_client/include
4444
ouster-sdk/ouster_pcap/include
45+
ouster-sdk/ouster_client/include/optional-lite
4546
)
4647

4748
# ==== Libraries ====
@@ -62,7 +63,7 @@ include_directories(
6263
${OpenCV_INCLUDE_DIRS})
6364

6465
# use only MPL-licensed parts of eigen
65-
add_definitions(-DEIGEN_MPL2_ONLY)
66+
add_compile_definitions(EIGEN_MPL2_ONLY)
6667

6768
set(OUSTER_TARGET_LINKS ouster_client)
6869
if (BUILD_PCAP)

ouster-ros/include/ouster_ros/os_ros.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define PCL_NO_PRECOMPILE
1313
#include <rclcpp/rclcpp.hpp>
1414
#include <geometry_msgs/msg/transform_stamped.hpp>
15-
#include <ouster/client.h>
1615
#include <ouster/lidar_scan.h>
1716
#include <ouster/types.h>
1817
#include <pcl/point_cloud.h>

ouster-ros/src/lidar_packet_handler.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
// clang-format on
1616

1717
#include <pcl_conversions/pcl_conversions.h>
18+
#include <rclcpp/rclcpp.hpp>
1819

1920
#include "lock_free_ring_buffer.h"
2021
#include <optional>
21-
#include <thread>
2222
#include <chrono>
23+
#include <mutex>
24+
#include <condition_variable>
25+
#include <thread>
26+
#include <vector>
27+
#include <string>
2328

2429
namespace {
2530

ouster-ros/src/os_sensor_node.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <atomic>
2020
#include <optional>
2121

22+
#include <ouster/client.h>
23+
2224
#include <std_srvs/srv/empty.hpp>
2325
#include "ouster_sensor_msgs/msg/packet_msg.hpp"
2426
#include "ouster_sensor_msgs/srv/get_config.hpp"

0 commit comments

Comments
 (0)