Skip to content

Commit

Permalink
Merge remote-tracking branch 'traversaro/patch-3' into tinyxml2
Browse files Browse the repository at this point in the history
  • Loading branch information
clalancette committed Nov 29, 2023
2 parents 713e457 + bef2860 commit 2c58e3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ 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 console_bridge)
set(PKG_DEPENDS TinyXML2 urdfdom_headers console_bridge)
set(PKG_EXPORTS urdfdom)
set(cmake_conf_file "cmake/urdfdom-config.cmake")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${cmake_conf_file}.in" "${CMAKE_BINARY_DIR}/${cmake_conf_file}" @ONLY)
Expand All @@ -81,7 +81,7 @@ install(FILES ${CMAKE_BINARY_DIR}/${cmake_conf_file}

# Make the package config file
set(PKG_DESC "Unified Robot Description Format")
set(PKG_DEPENDS "urdfdom_headers console_bridge") # make the list separated by spaces instead of ;
set(PKG_DEPENDS "tinyxml2 urdfdom_headers console_bridge") # make the list separated by spaces instead of ;
set(PKG_URDF_LIBS "-lurdfdom_sensor -lurdfdom_model_state -lurdfdom_model -lurdfdom_world")
set(pkg_conf_file "cmake/pkgconfig/urdfdom.pc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
Expand Down
3 changes: 2 additions & 1 deletion cmake/urdfdom-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (@PKG_NAME@_CONFIG_INCLUDED)
endif()
set(@PKG_NAME@_CONFIG_INCLUDED TRUE)

set(@PKG_NAME@_INCLUDE_DIRS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "@TinyXML_INCLUDE_DIRS@")
set(@PKG_NAME@_INCLUDE_DIRS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@")

foreach(lib @PKG_LIBRARIES@)
set(onelib "${lib}-NOTFOUND")
Expand All @@ -30,6 +30,7 @@ foreach(lib @PKG_LIBRARIES@)
list(APPEND @PKG_NAME@_TARGETS @PROJECT_NAME@::${lib})
endforeach()

find_package(tinyxml2_vendor QUIET)
foreach(dep @PKG_DEPENDS@)
if(NOT ${dep}_FOUND)
find_package(${dep})
Expand Down

0 comments on commit 2c58e3f

Please sign in to comment.