From f52adcc489353c510d41385758e84e0b9d8830f8 Mon Sep 17 00:00:00 2001 From: "G.A. vd. Hoorn" Date: Fri, 4 Nov 2022 19:45:37 +0100 Subject: [PATCH] Build-time RMW selection does not need ament_index_cpp (#210) So don't find_package(..) it if RMW_IMPLEMENTATION_DISABLE_RUNTIME_SELECTION is OFF. Signed-off-by: gavanderhoorn (cherry picked from commit 11652db13a0af843b4e6cca12659d07959a9dd24) --- rmw_implementation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmw_implementation/CMakeLists.txt b/rmw_implementation/CMakeLists.txt index a54ca52f..2926c71b 100644 --- a/rmw_implementation/CMakeLists.txt +++ b/rmw_implementation/CMakeLists.txt @@ -12,7 +12,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake REQUIRED) -find_package(ament_index_cpp REQUIRED) find_package(rmw_implementation_cmake REQUIRED) if(BUILD_TESTING) @@ -47,6 +46,7 @@ if(RMW_IMPLEMENTATION_DISABLE_RUNTIME_SELECTION) else() message(STATUS "Runtime selection of RMW enabled") + find_package(ament_index_cpp REQUIRED) find_package(rcpputils REQUIRED) find_package(rcutils REQUIRED) find_package(rmw REQUIRED)