Skip to content

Commit

Permalink
clean up test dependencies for rosbag2_test_common (ros2#118)
Browse files Browse the repository at this point in the history
* clean up test dependencies for rosbag2_test_common

Signed-off-by: Karsten Knese <karsten@openrobotics.org>

* use build and exec depend

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
  • Loading branch information
Karsten1987 committed May 9, 2019
1 parent ce40262 commit 876118b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
17 changes: 8 additions & 9 deletions rosbag2_test_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,25 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

find_package(ament_cmake REQUIRED)

find_package(ament_cmake_gmock REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(rclcpp REQUIRED)

ament_lint_auto_find_test_dependencies()
find_package(rcutils REQUIRED)

add_library(${PROJECT_NAME} INTERFACE)

target_include_directories(${PROJECT_NAME} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

target_link_libraries(${PROJECT_NAME} INTERFACE rclcpp rcutils)

ament_export_dependencies(rclcpp)

install(
DIRECTORY include/
DESTINATION include)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_dependencies(rclcpp rcutils)

ament_export_include_directories(include)
ament_package()
10 changes: 6 additions & 4 deletions rosbag2_test_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<test_depend>ament_cmake_gmock</test_depend>
<build_depend>rclcpp</build_depend>
<build_depend>rcutils</build_depend>

<exec_depend>rclcpp</exec_depend>
<exec_depend>rcutils</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>rclcpp</test_depend>
<test_depend>rcutils</test_depend>
<build_export_depend>rclcpp</build_export_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit 876118b

Please sign in to comment.