Skip to content

Commit

Permalink
consider exported interfaces in ament_target_dependencies (#232)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
dirk-thomas authored and j-rivero committed Apr 27, 2020
1 parent 942ddc8 commit 8c7674d
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -45,6 +45,7 @@ function(ament_target_dependencies target)
endif()
set(definitions "")
set(include_dirs "")
set(interfaces "")
set(libraries "")
set(link_flags "")
foreach(package_name ${ARG_UNPARSED_ARGUMENTS})
Expand All @@ -53,12 +54,15 @@ function(ament_target_dependencies target)
endif()
list_append_unique(definitions ${${package_name}_DEFINITIONS})
list_append_unique(include_dirs ${${package_name}_INCLUDE_DIRS})
list_append_unique(interfaces ${${package_name}_INTERFACES})
list(APPEND libraries ${${package_name}_LIBRARIES})
list_append_unique(link_flags ${${package_name}_LINK_FLAGS})
endforeach()
target_compile_definitions(${target}
PUBLIC ${definitions})
ament_include_directories_order(ordered_include_dirs ${include_dirs})
target_link_libraries(${target}
${TARGET_LINK_LIBRARIES_VISIBILITY} ${interfaces})
target_include_directories(${target}
PUBLIC ${ordered_include_dirs})
ament_libraries_deduplicate(unique_libraries ${libraries})
Expand Down

0 comments on commit 8c7674d

Please sign in to comment.