From b192251768480690c3fdb94a19b953c55c5e58ee Mon Sep 17 00:00:00 2001 From: SuperJappie08 <36795178+SuperJappie08@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:44:05 +0200 Subject: [PATCH] Support pre-Iron distros --- .gitignore | 1 + include/web_video_server/web_video_server.h | 8 +++++++- src/image_streamer.cpp | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 86b18f5..9bfdd4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .cproject .project +COLCON_IGNORE \ No newline at end of file diff --git a/include/web_video_server/web_video_server.h b/include/web_video_server/web_video_server.h index 07d6e54..07c26f3 100644 --- a/include/web_video_server/web_video_server.h +++ b/include/web_video_server/web_video_server.h @@ -2,7 +2,13 @@ #define WEB_VIDEO_SERVER_H_ #include -#include + +#if __has_include() +#include // For ROS Iron and up. +#else +#include // For ROS Humble and below +#endif + #include #include "web_video_server/image_streamer.h" #include "async_web_server_cpp/http_server.hpp" diff --git a/src/image_streamer.cpp b/src/image_streamer.cpp index 4427b25..6b5b393 100644 --- a/src/image_streamer.cpp +++ b/src/image_streamer.cpp @@ -1,5 +1,9 @@ #include "web_video_server/image_streamer.h" -#include +#if __has_include() +#include // For ROS Iron and up. +#else +#include // For ROS Humble and below +#endif #include namespace web_video_server