From 647000bf5accb986b8542b4abba6948a5b65203c Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 13 Mar 2025 12:35:56 +0100 Subject: [PATCH 1/2] Use modern CMake to link against yaml-cpp --- ur_calibration/CMakeLists.txt | 6 ++---- ur_calibration/package.xml | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ur_calibration/CMakeLists.txt b/ur_calibration/CMakeLists.txt index 0b17e4d5f..a3e498876 100644 --- a/ur_calibration/CMakeLists.txt +++ b/ur_calibration/CMakeLists.txt @@ -17,11 +17,10 @@ find_package(rclcpp REQUIRED) find_package(ur_robot_driver REQUIRED) find_package(Eigen3 REQUIRED) +find_package(yaml_cpp_vendor REQUIRED) find_package(yaml-cpp REQUIRED) find_package(ur_client_library REQUIRED) -set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) - ########### ## Build ## ########### @@ -34,10 +33,9 @@ target_include_directories(calibration PUBLIC include ${EIGEN3_INCLUDE_DIRS} - ${YAML_CPP_INCLUDE_DIRS} ) target_link_libraries(calibration - ${YAML_CPP_LIBRARIES} + yaml-cpp::yaml-cpp ) ament_target_dependencies(calibration rclcpp diff --git a/ur_calibration/package.xml b/ur_calibration/package.xml index 97bf04908..3dbad820f 100644 --- a/ur_calibration/package.xml +++ b/ur_calibration/package.xml @@ -21,6 +21,7 @@ eigen yaml-cpp + yaml_cpp_vendor ament_cmake_gmock ament_cmake_gtest From 037603128883ea487eb849195dcfaea1c80e5db6 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Fri, 14 Mar 2025 14:38:38 +0100 Subject: [PATCH 2/2] Remove direct yaml-cpp include --- ur_calibration/CMakeLists.txt | 3 +-- ur_calibration/package.xml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ur_calibration/CMakeLists.txt b/ur_calibration/CMakeLists.txt index a3e498876..e95014a13 100644 --- a/ur_calibration/CMakeLists.txt +++ b/ur_calibration/CMakeLists.txt @@ -18,7 +18,6 @@ find_package(ur_robot_driver REQUIRED) find_package(Eigen3 REQUIRED) find_package(yaml_cpp_vendor REQUIRED) -find_package(yaml-cpp REQUIRED) find_package(ur_client_library REQUIRED) ########### @@ -35,7 +34,7 @@ target_include_directories(calibration ${EIGEN3_INCLUDE_DIRS} ) target_link_libraries(calibration - yaml-cpp::yaml-cpp + yaml-cpp ) ament_target_dependencies(calibration rclcpp diff --git a/ur_calibration/package.xml b/ur_calibration/package.xml index 3dbad820f..6e6558d33 100644 --- a/ur_calibration/package.xml +++ b/ur_calibration/package.xml @@ -20,7 +20,6 @@ ur_robot_driver eigen - yaml-cpp yaml_cpp_vendor ament_cmake_gmock