Skip to content

Commit 204e215

Browse files
authored
Use modern CMake to link against yaml-cpp (backport of #1295) (#1304)
* Use modern CMake to link against yaml-cpp * Remove direct yaml-cpp include
1 parent 298514a commit 204e215

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ur_calibration/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ find_package(rclcpp REQUIRED)
1717
find_package(ur_robot_driver REQUIRED)
1818

1919
find_package(Eigen3 REQUIRED)
20-
find_package(yaml-cpp REQUIRED)
20+
find_package(yaml_cpp_vendor REQUIRED)
2121
find_package(ur_client_library REQUIRED)
2222

23-
set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
24-
2523
###########
2624
## Build ##
2725
###########
@@ -34,10 +32,9 @@ target_include_directories(calibration
3432
PUBLIC
3533
include
3634
${EIGEN3_INCLUDE_DIRS}
37-
${YAML_CPP_INCLUDE_DIRS}
3835
)
3936
target_link_libraries(calibration
40-
${YAML_CPP_LIBRARIES}
37+
yaml-cpp
4138
)
4239
ament_target_dependencies(calibration
4340
rclcpp

ur_calibration/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<depend>ur_robot_driver</depend>
2020

2121
<depend>eigen</depend>
22-
<depend>yaml-cpp</depend>
22+
<depend>yaml_cpp_vendor</depend>
2323

2424
<test_depend>ament_cmake_gmock</test_depend>
2525
<test_depend>ament_cmake_gtest</test_depend>

0 commit comments

Comments
 (0)