Skip to content

Commit

Permalink
Remove non-package from ament_target_dependencies() (#76)
Browse files Browse the repository at this point in the history
* Remove non-package from ament_target_dependencies()

Also set _FOUND to trick ament_target_dependencies() call for test
interfaces

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Remove linking call since it wasn't needed before

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Comment why setting _FOUND

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz committed Jul 25, 2019
1 parent cc7f838 commit 0015f60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rosidl_generator_py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ if(BUILD_TESTING)
include(cmake/register_py.cmake)
include(cmake/rosidl_generator_py_get_typesupports.cmake)

# Trick ament_target_dependencies() into thinking this package has been found
set(rosidl_generator_py_FOUND "1")
set(rosidl_generator_py_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# Need to call extras before get_typesupports, to register the extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ foreach(_typesupport_impl ${_typesupport_impls})
ament_target_dependencies(${_target_name}
"rosidl_generator_c"
"rosidl_generator_py"
"${rosidl_generate_interfaces_TARGET}__rosidl_generator_c"
)

if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
Expand Down

0 comments on commit 0015f60

Please sign in to comment.