From 1babbf6065fe2ccdda5d8e665686231b02c10a70 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 09:51:29 +0200 Subject: [PATCH] config.cmake: find urdfdom_headers directly, drop target creation --- CMakeLists.txt | 1 - cmake/urdfdom-config.cmake.in | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7530fd2e..bb025a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,6 @@ add_subdirectory(urdf_parser) set(PKG_NAME ${PROJECT_NAME}) set(PKG_LIBRARIES urdfdom_sensor urdfdom_model_state urdfdom_model urdfdom_world) -set(PKG_DEPENDS urdfdom_headers) set(PKG_EXPORTS urdfdom) set(cmake_conf_file "cmake/urdfdom-config") include(CMakePackageConfigHelpers) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index ee018b1f..2905cdfa 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -43,18 +43,8 @@ else() find_dependency(TinyXML2 REQUIRED) find_dependency(console_bridge REQUIRED) endif() -foreach(dep @PKG_DEPENDS@) - if(NOT ${dep}_FOUND) - find_dependency(${dep}) - endif() -endforeach() -if(NOT TARGET urdfdom_headers::urdfdom_headers) - add_library(urdfdom_headers::urdfdom_headers INTERFACE IMPORTED) - set_target_properties(urdfdom_headers::urdfdom_headers PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${urdfdom_headers_INCLUDE_DIRS}" - ) -endif() +find_dependency(urdfdom_headers REQUIRED) list(APPEND @PKG_NAME@_INCLUDE_DIRS "${urdfdom_headers_INCLUDE_DIRS}") foreach(exp @PKG_EXPORTS@)