From ed5f5b7898eda760d695da9816a5b983db6e5fad Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu Date: Sun, 19 Jul 2026 18:05:05 +1000 Subject: [PATCH] Add Windows export settings for laser_filters This upstreams RoboStack downstream patch `patch/ros-rolling-laser-filters.win.patch`. Best-guess rationale: the laser_filters shared libraries need exported symbols on Windows, and the scan binning filter should avoid the non-standard uint typedef for better compiler portability. The original downstream patch also linked Boost thread for older code, but upstream removed the remaining Boost recursive mutex usage in ros-perception/laser_filters#209, so this upstream PR no longer needs to add any Boost dependency. Signed-off-by: Tobias Fischer --- CMakeLists.txt | 5 +++++ include/laser_filters/binning_filter.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5775623..7eac0e7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,11 @@ ament_auto_add_library(laser_filter_chains SHARED src/scan_to_cloud_filter_chain.cpp src/scan_to_scan_filter_chain.cpp) +if(WIN32) + set_target_properties(laser_scan_filters PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + set_target_properties(laser_filter_chains PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + # The rclcpp_components_register_node macro registers an rclcpp component for the node with # the ament resource index AND creates a templated executable that spins the given node. diff --git a/include/laser_filters/binning_filter.h b/include/laser_filters/binning_filter.h index d28a32b8..b153119e 100644 --- a/include/laser_filters/binning_filter.h +++ b/include/laser_filters/binning_filter.h @@ -51,7 +51,7 @@ class LaserScanBinningFilter : public filters::FilterBase