From 7b030df3b1578bbce03d6a9bf9b4d54c09efd720 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Mon, 16 Jul 2018 14:06:56 -0700 Subject: [PATCH] avoid recursive find --- .../rmw_implementation-extras.cmake.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rmw_implementation/rmw_implementation-extras.cmake.in b/rmw_implementation/rmw_implementation-extras.cmake.in index ac8b6d88..4672bd31 100644 --- a/rmw_implementation/rmw_implementation-extras.cmake.in +++ b/rmw_implementation/rmw_implementation-extras.cmake.in @@ -66,13 +66,15 @@ endif() if(@RMW_IMPLEMENTATION_SUPPORTS_POCO@) set(selected_rmw_implementation "@PROJECT_NAME@") + # no need to find_package @PROJECT_NAME@ + # since this code is already part of a find_package call of that package else() set(selected_rmw_implementation "${default_rmw_implementation}") message(STATUS "Using RMW implementation '${selected_rmw_implementation}' as default") -endif() -find_package("${selected_rmw_implementation}" REQUIRED) + find_package("${selected_rmw_implementation}" REQUIRED) -# TODO should never need definitions and include dirs? -list(APPEND rmw_implementation_DEFINITIONS ${${selected_rmw_implementation}_DEFINITIONS}) -list(APPEND rmw_implementation_INCLUDE_DIRS ${${selected_rmw_implementation}_INCLUDE_DIRS}) -list(APPEND rmw_implementation_LIBRARIES ${${selected_rmw_implementation}_LIBRARIES}) + # TODO should never need definitions and include dirs? + list(APPEND rmw_implementation_DEFINITIONS ${${selected_rmw_implementation}_DEFINITIONS}) + list(APPEND rmw_implementation_INCLUDE_DIRS ${${selected_rmw_implementation}_INCLUDE_DIRS}) + list(APPEND rmw_implementation_LIBRARIES ${${selected_rmw_implementation}_LIBRARIES}) +endif()