From 0e61d1f12764ed3aa7b00150eced26ace28be814 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 30 Nov 2023 19:58:40 +0000 Subject: [PATCH] Install the FindTinyXML2.cmake file. This is so downstream projects can always find it. Signed-off-by: Chris Lalancette --- CMakeLists.txt | 6 +++++- cmake/urdfdom-config.cmake.in | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68084590..13ba51eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,11 @@ install(FILES DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} ) +# Some operating systems (like Ubuntu 22.04) do not provide a default +# way to find TinyXML2. For that reason, this package provides it +install(FILES cmake/FindTinyXML2.cmake + DESTINATION ${CMAKE_CONFIG_INSTALL_DIR}) + install(FILES package.xml DESTINATION share/${PROJECT_NAME}) # Make the package config file @@ -102,7 +107,6 @@ install(FILES ${CMAKE_BINARY_DIR}/${pkg_conf_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig) - # Add uninstall target # Ref: http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F configure_file( diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index ea8788fb..f9fa1ccc 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -5,6 +5,8 @@ if (@PKG_NAME@_CONFIG_INCLUDED) endif() set(@PKG_NAME@_CONFIG_INCLUDED TRUE) +list(APPEND CMAKE_MODULE_PATH "${@PROJECT_NAME@_DIR}") + set(@PKG_NAME@_INCLUDE_DIRS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@") foreach(lib @PKG_LIBRARIES@)