Skip to content

Commit e960b54

Browse files
authored
switch to use yaml_cpp_vendor (#640)
Solves yaml_cpp linking errors in ros2 foxy
1 parent 3dbd48a commit e960b54

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ find_package(tf2_geometry_msgs REQUIRED)
3030
find_package(tf2_ros REQUIRED)
3131
find_package(Eigen3 REQUIRED)
3232
find_package(Boost REQUIRED)
33+
find_package(yaml_cpp_vendor REQUIRED)
3334

3435
# Geographiclib installs FindGeographicLib.cmake to this non-standard location
3536
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/")
3637
find_package(GeographicLib REQUIRED COMPONENTS STATIC)
3738

38-
find_package(PkgConfig REQUIRED)
39-
pkg_check_modules(YAML_CPP yaml-cpp)
40-
4139
set(library_name rl_lib)
4240

4341
rosidl_generate_interfaces(${PROJECT_NAME}
@@ -101,7 +99,6 @@ target_link_libraries(
10199
${library_name}
102100
${GeographicLib_LIBRARIES}
103101
${EIGEN3_LIBRARIES}
104-
${YAML_CPP_LIBRARIES}
105102
)
106103

107104
ament_target_dependencies(
@@ -119,6 +116,7 @@ ament_target_dependencies(
119116
tf2_eigen
120117
tf2_geometry_msgs
121118
tf2_ros
119+
yaml_cpp_vendor
122120
)
123121

124122
target_link_libraries(

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<depend>tf2_eigen</depend>
3737
<depend>tf2_geometry_msgs</depend>
3838
<depend>tf2_ros</depend>
39-
<depend>yaml-cpp</depend>
39+
<depend>yaml_cpp_vendor</depend>
4040

4141
<test_depend>ament_cmake_gtest</test_depend>
4242
<test_depend>builtin_interfaces</test_depend>

0 commit comments

Comments
 (0)