Skip to content

Commit

Permalink
Deduplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Dec 21, 2023
1 parent c893aa7 commit c582b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/install/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 3.22)
project(rsl-install-test CXX)

add_executable(test-rsl-install install.cpp)

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)

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 c582b49

Please sign in to comment.