Skip to content

Commit

Permalink
Add patches for Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Jan 9, 2025
1 parent 66cd8e0 commit e7f7d95
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patch/ros-jazzy-ros-gz-bridge.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/ros_gz_bridge/CMakeLists.txt b/ros_gz_bridge/CMakeLists.txt
index 44911577..76779457 100644
--- a/ros_gz_bridge/CMakeLists.txt
+++ b/ros_gz_bridge/CMakeLists.txt
@@ -11,4 +11,7 @@ if(NOT CMAKE_CXX_STANDARD)
+elseif(MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
9 changes: 9 additions & 0 deletions patch/ros-jazzy-ros-gz-sim.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff --git a/ros_gz_sim/CMakeLists.txt b/ros_gz_sim/CMakeLists.txt
index dc8deb03..ec6ac678 100644
--- a/ros_gz_sim/CMakeLists.txt
+++ b/ros_gz_sim/CMakeLists.txt
@@ -12,3 +12,4 @@ endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
10 changes: 10 additions & 0 deletions patch/ros-jazzy-zstd-image-transport.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/zstd_image_transport/src/zstd_publisher.cpp b/zstd_image_transport/src/zstd_publisher.cpp
index b215930..301a58c 100644
--- a/zstd_image_transport/src/zstd_publisher.cpp
+++ b/zstd_image_transport/src/zstd_publisher.cpp
@@ -86,4 +86,4 @@ void ZstdPublisher::advertiseImpl(
- uint ns_len = node->get_effective_namespace().length();
+ unsigned int ns_len = node->get_effective_namespace().length();
std::string param_base_name = base_topic.substr(ns_len);
std::replace(param_base_name.begin(), param_base_name.end(), '/', '.');

0 comments on commit e7f7d95

Please sign in to comment.