From 41e0bacdd80c55817f250c0c504ccdfcc257e96e Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Tue, 18 Mar 2025 11:46:26 +0100 Subject: [PATCH] Use modern CMake to link against yaml-cpp (#1295) * Use modern CMake to link against yaml-cpp * Remove direct yaml-cpp include (cherry picked from commit 843e500cde2801509d86af4496ab9a971841d006) --- ur_calibration/CMakeLists.txt | 7 ++----- ur_calibration/package.xml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ur_calibration/CMakeLists.txt b/ur_calibration/CMakeLists.txt index 0b17e4d5f..e95014a13 100644 --- a/ur_calibration/CMakeLists.txt +++ b/ur_calibration/CMakeLists.txt @@ -17,11 +17,9 @@ find_package(rclcpp REQUIRED) find_package(ur_robot_driver REQUIRED) find_package(Eigen3 REQUIRED) -find_package(yaml-cpp REQUIRED) +find_package(yaml_cpp_vendor REQUIRED) find_package(ur_client_library REQUIRED) -set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) - ########### ## Build ## ########### @@ -34,10 +32,9 @@ target_include_directories(calibration PUBLIC include ${EIGEN3_INCLUDE_DIRS} - ${YAML_CPP_INCLUDE_DIRS} ) target_link_libraries(calibration - ${YAML_CPP_LIBRARIES} + yaml-cpp ) ament_target_dependencies(calibration rclcpp diff --git a/ur_calibration/package.xml b/ur_calibration/package.xml index 01e0a643b..2bf3dbfe0 100644 --- a/ur_calibration/package.xml +++ b/ur_calibration/package.xml @@ -19,7 +19,7 @@ ur_robot_driver eigen - yaml-cpp + yaml_cpp_vendor ament_cmake_gmock ament_cmake_gtest