Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake yaml #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions dynmsg_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ find_package(dynmsg REQUIRED)
find_package(rcl REQUIRED)
find_package(rcl_action REQUIRED)
find_package(yaml_cpp_vendor REQUIRED)
find_package(yaml-cpp REQUIRED)

include_directories(include)
add_library(dynmsg_demo_library STATIC
Expand All @@ -39,6 +40,7 @@ ament_export_targets(dynmsg_demo_library HAS_LIBRARY_TARGET)
ament_export_dependencies(dynmsg)
ament_export_dependencies(rcl)
ament_export_dependencies(rcl_action)
ament_export_dependencies(yaml-cpp)

install(
DIRECTORY include/
Expand All @@ -55,7 +57,7 @@ install(

add_executable(clitool src/cli_tool.cpp)
# should have been PRIVATE, but ament uses the old signature and we can't mix them
target_link_libraries(clitool dynmsg_demo_library)
target_link_libraries(clitool dynmsg_demo_library yaml-cpp::yaml-cpp)
ament_target_dependencies(clitool dynmsg rcl yaml_cpp_vendor)

install(TARGETS clitool DESTINATION lib/${PROJECT_NAME})
Expand All @@ -82,7 +84,7 @@ if(BUILD_TESTING)
if(TEST_ASAN)
target_compile_options(msg_parser_test PRIVATE -fsanitize=address)
endif()
target_link_libraries(msg_parser_test dynmsg_demo_library ${asan_link_lib})
target_link_libraries(msg_parser_test dynmsg_demo_library ${asan_link_lib} yaml-cpp::yaml-cpp)
ament_target_dependencies(msg_parser_test
rcl
test_msgs
Expand All @@ -92,7 +94,7 @@ if(BUILD_TESTING)
)
ament_add_gtest(read_msg_buffer test/test_read_msg_buffer.cpp)
ament_target_dependencies(read_msg_buffer example_interfaces test_msgs)
target_link_libraries(read_msg_buffer dynmsg_demo_library)
target_link_libraries(read_msg_buffer dynmsg_demo_library yaml-cpp::yaml-cpp)
endif()

ament_package()