Skip to content

Commit

Permalink
Fix linker error undefined reference: YAML::... (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
yushijinhun authored Apr 23, 2024
1 parent 94cf059 commit 642c801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interbotix_ros_xseries/interbotix_xs_sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ find_library(YAML_CPP_LIBRARY
NAMES YAML_CPP
PATHS ${YAML_CPP_LIBRARY_DIRS}
)
link_directories(${YAML_CPP_LIBRARY_DIRS})

if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")
add_definitions(-DHAVE_NEW_YAMLCPP)
Expand Down Expand Up @@ -67,6 +66,7 @@ include_directories(
add_library(${PROJECT_NAME}
src/xs_sdk_obj.cpp
)
target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Declare a C++ executable
Expand Down

0 comments on commit 642c801

Please sign in to comment.