<commit_before>set(PROJECT_NAME <%= typekit.name %>_msgs)
set(<%= typekit.name %>_msgs_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
<% typekit_deps = typekit.plugin('ros').dependencies(typekit); %>

find_package(catkin REQUIRED)
find_package(genmsg REQUIRED)

<%= Generation.cmake_pkgconfig_require(typekit_deps, 'ros') %>

<% if !all_messages.empty?
%>
add_message_files(DIRECTORY msg
    FILES
    <%= all_messages.join(".msg\n    ") %>.msg)

<%
msg_deps = typekit.used_typekits.map do |tk|
    next if tk.virtual?
    tk.name
end.compact
%>

<% msg_deps.each do |dep_name| %>
find_package(<%= dep_name %>_msgs)
<% end %>

<% if msg_deps.empty? %>
generate_messages()
<% else %>
generate_messages(DEPENDENCIES <%= msg_deps.join("_msgs ") %>_msgs)
<% end %>
include_directories(${CMAKE_BINARY_DIR}/gen/cpp)
<% end # end of if !all_messages.empty?
%>

set(libname_ros <%= typekit.name %>-transport-ros-${OROCOS_TARGET})
add_library(${libname_ros} SHARED
    <%= impl.join("\n    ") %>)
<% deps = all_messages.map { |msg_name| "${CMAKE_BINARY_DIR}/gen/gencpp/#{typekit.name}_msgs" }.join(";") %>
set_source_files_properties(impl.join(" ")
    PROPERTIES OBJECT_DEPENDS "<%= deps %>")
target_link_libraries(${libname_ros}
    <%= typekit.name %>-typekit-${OROCOS_TARGET}
    ${OrocosROS_LIBRARIES})

SET(PKG_CONFIG_FILE_ROS ${CMAKE_CURRENT_BINARY_DIR}/<%= typekit.name %>-transport-ros-${OROCOS_TARGET}.pc)
CONFIGURE_FILE(<%= typekit.name %>-transport-ros.pc.in ${PKG_CONFIG_FILE_ROS} @ONLY)
install(TARGETS ${libname_ros} LIBRARY DESTINATION lib/orocos/types)
install(FILES ${PKG_CONFIG_FILE_ROS} DESTINATION lib/pkgconfig)<commit_msg>ros: properly link to our dependencies<commit_after>set(PROJECT_NAME <%= typekit.name %>_msgs)
set(<%= typekit.name %>_msgs_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
<% typekit_deps = typekit.plugin('ros').dependencies(typekit); %>

find_package(catkin REQUIRED)
find_package(genmsg REQUIRED)

<%= Generation.cmake_pkgconfig_require(typekit_deps, 'ros') %>

<% if !all_messages.empty?
%>
add_message_files(DIRECTORY msg
    FILES
    <%= all_messages.join(".msg\n    ") %>.msg)

<%
msg_deps = typekit.used_typekits.map do |tk|
    next if tk.virtual?
    tk.name
end.compact
%>

<% msg_deps.each do |dep_name| %>
find_package(<%= dep_name %>_msgs)
<% end %>

<% if msg_deps.empty? %>
generate_messages()
<% else %>
generate_messages(DEPENDENCIES <%= msg_deps.join("_msgs ") %>_msgs)
<% end %>
include_directories(${CMAKE_BINARY_DIR}/gen/cpp)
<% end # end of if !all_messages.empty?
%>

set(libname_ros <%= typekit.name %>-transport-ros-${OROCOS_TARGET})
add_library(${libname_ros} SHARED
    <%= impl.join("\n    ") %>)
<% deps = all_messages.map { |msg_name| "${CMAKE_BINARY_DIR}/gen/gencpp/#{typekit.name}_msgs" }.join(";") %>
set_source_files_properties(impl.join(" ")
    PROPERTIES OBJECT_DEPENDS "<%= deps %>")
target_link_libraries(${libname_ros}
    <%= typekit.name %>-typekit-${OROCOS_TARGET}
    ${OrocosROS_LIBRARIES})
<%= Generation.cmake_pkgconfig_link('ros', '${libname_ros}', typekit_deps) %>

SET(PKG_CONFIG_FILE_ROS ${CMAKE_CURRENT_BINARY_DIR}/<%= typekit.name %>-transport-ros-${OROCOS_TARGET}.pc)
CONFIGURE_FILE(<%= typekit.name %>-transport-ros.pc.in ${PKG_CONFIG_FILE_ROS} @ONLY)
install(TARGETS ${libname_ros} LIBRARY DESTINATION lib/orocos/types)
install(FILES ${PKG_CONFIG_FILE_ROS} DESTINATION lib/pkgconfig)
{'fraction_non_alphanumeric': 0.17554299315679858, 'fraction_numerical': 0.0, 'mean_word_length': 6.2770562770562774, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1452741', 'n_tokens_mistral': 1432, 'n_tokens_neox': 1299, 'n_words': 185}