Skip to content

Commit

Permalink
Test consuming RSL via ament_target_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Dec 21, 2023
1 parent 7a99bad commit 3b73cfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<depend>tcb_span</depend>
<depend>tl_expected</depend>

<test_depend>ament_cmake_ros</test_depend>
<test_depend>clang-tidy</test_depend>
<test_depend>git</test_depend>
<test_depend>range-v3</test_depend>
Expand Down
12 changes: 9 additions & 3 deletions tests/install/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ cmake_minimum_required(VERSION 3.22)
project(rsl-install-test)

if(PROJECT_IS_TOP_LEVEL)
# Test consumption via find_package interface and ament_target_dependencies
find_package(ament_cmake_ros REQUIRED)
find_package(rsl 1.1.0 EXACT REQUIRED)
endif()

add_executable(test-rsl-install install.cpp)
target_link_libraries(test-rsl-install PRIVATE rsl::rsl)
add_executable(test-rsl-install install.cpp)
ament_target_dependencies(test-rsl-install rsl)
else()
# Test consumption via in-tree build
add_executable(test-rsl-install install.cpp)
target_link_libraries(test-rsl-install PRIVATE rsl::rsl)
endif()

0 comments on commit 3b73cfd

Please sign in to comment.