From a0a94e4f1970c9d25690e6a96a833cea0c3025b3 Mon Sep 17 00:00:00 2001 From: J-C-Haley Date: Fri, 31 Jan 2025 13:25:12 -0500 Subject: [PATCH 1/2] update headers to hpp for jazzy/rolling --- CMakeLists.txt | 29 ++++++++++++++--------------- include/cv_camera/capture.h | 6 +++--- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c84b79c..21c992a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ find_package(rclcpp REQUIRED) find_package(image_transport REQUIRED) find_package(cv_bridge REQUIRED) find_package(std_msgs REQUIRED) -find_package(cv_bridge REQUIRED) find_package(camera_info_manager REQUIRED) # find_package(roslint REQUIRED) find_package(builtin_interfaces REQUIRED) @@ -50,23 +49,23 @@ target_link_libraries(cv_camera_node ${Boost_LIBRARIES} cv_camera) ## Specify libraries to link a library or executable target against ament_target_dependencies(cv_camera - "rclcpp" - "sensor_msgs" - "image_transport" - "cv_bridge" - "camera_info_manager" - "std_msgs" - "OpenCV" + rclcpp + sensor_msgs + image_transport + cv_bridge + camera_info_manager + std_msgs + OpenCV ) ament_target_dependencies(cv_camera_node - "rclcpp" - "sensor_msgs" - "std_msgs" - "OpenCV" - "camera_info_manager" - "image_transport" - "cv_bridge" + rclcpp + sensor_msgs + std_msgs + OpenCV + camera_info_manager + image_transport + cv_bridge ) ############# diff --git a/include/cv_camera/capture.h b/include/cv_camera/capture.h index 9488a38..3a3e7c6 100644 --- a/include/cv_camera/capture.h +++ b/include/cv_camera/capture.h @@ -7,12 +7,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include /** * @brief namespace of this package From e961bfa1a7ef3244b76609c495f6fe95e8293555 Mon Sep 17 00:00:00 2001 From: J-C-Haley Date: Fri, 31 Jan 2025 13:33:21 -0500 Subject: [PATCH 2/2] makes hpp vs h optional --- include/cv_camera/capture.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/include/cv_camera/capture.h b/include/cv_camera/capture.h index 3a3e7c6..f5c34bf 100644 --- a/include/cv_camera/capture.h +++ b/include/cv_camera/capture.h @@ -7,12 +7,27 @@ #include #include -#include -#include #include #include #include + +#if __has_include() +#include +#else +#include +#endif + +#if __has_include() +#include +#else +#include +#endif + +#if __has_include() #include +#else +#include +#endif /** * @brief namespace of this package