Skip to content

Commit

Permalink
config.cmake: find urdfdom_headers directly, drop target creation
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Feb 29, 2024
1 parent a2fbb27 commit 1babbf6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 1 addition & 11 deletions cmake/urdfdom-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
Expand Down

0 comments on commit 1babbf6

Please sign in to comment.