From 86b4245767cfff143e0f78485d0beb41a7967d6d Mon Sep 17 00:00:00 2001 From: Geoffrey Biggs Date: Tue, 19 Jul 2022 07:52:18 +0900 Subject: [PATCH] Move xmlrpcpp find_package so it only searches if ROS 1 is found Signed-off-by: Geoffrey Biggs --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f329e41f..9eb3770d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,6 @@ find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rmw_implementation_cmake REQUIRED) find_package(std_msgs REQUIRED) -find_package(xmlrpcpp REQUIRED) # find ROS 1 packages set(cmake_extras_files cmake/find_ros1_package.cmake cmake/find_ros1_interface_packages.cmake) @@ -45,6 +44,10 @@ endif() find_ros1_package(std_msgs REQUIRED) +# Dependency that we should only look for if ROS 1 is installed (it's not present on a ROS 2 +# system; see https://github.com/ros2/ros1_bridge/pull/331#issuecomment-1188111510) +find_package(xmlrpcpp REQUIRED) + # find ROS 1 packages with messages / services include(cmake/find_ros1_interface_packages.cmake) find_ros1_interface_packages(ros1_message_packages)