From 2ca60768244b1c2839122a59d415379ce2beaeba Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 09:36:27 +0200 Subject: [PATCH 01/12] Set _USE_MATH_DEFINES for MSVC Signed-off-by: Martin Valgur --- urdf_parser/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt index 20a6a050..5d2a26a7 100644 --- a/urdf_parser/CMakeLists.txt +++ b/urdf_parser/CMakeLists.txt @@ -22,6 +22,9 @@ macro(add_urdfdom_library) set_target_properties(${add_urdfdom_library_LIBNAME} PROPERTIES DEFINE_SYMBOL URDFDOM_EXPORTS SOVERSION ${URDF_MAJOR_MINOR_VERSION}) + if(MSVC) + target_compile_definitions(${add_urdfdom_library_LIBNAME} PUBLIC _USE_MATH_DEFINES) + endif() endmacro() if(TARGET console_bridge::console_bridge) From f71f6b0bbdd646020085b4fefe4dc198aa1d8036 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 09:39:03 +0200 Subject: [PATCH 02/12] Fix the use of a deprecated CMake property Signed-off-by: Martin Valgur --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5330130..b46ecc76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ endif() # with MSVC being set off, but MSVCXX ON. if(MSVC OR MSVC90 OR MSVC10) set(MSVC ON) -endif (MSVC OR MSVC90 OR MSVC10) +endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -108,6 +108,6 @@ add_custom_target(uninstall message(STATUS "Configuration successful. Type make to compile urdfdom") -SET_DIRECTORY_PROPERTIES(PROPERTIES - ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/cmake/urdfdom-config.cmake - ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/cmake/pkgconfig/urdfdom.pc) +set_directory_properties(PROPERTIES + ADDITIONAL_CLEAN_FILES ${CMAKE_BINARY_DIR}/cmake/urdfdom-config.cmake + ADDITIONAL_CLEAN_FILES ${CMAKE_BINARY_DIR}/cmake/pkgconfig/urdfdom.pc) From a71a4d8f4c771a1307845150dd491a2dfe163f52 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 09:42:56 +0200 Subject: [PATCH 03/12] Add BUILD_APPS and BUILD_TESTING options Signed-off-by: Martin Valgur --- CMakeLists.txt | 2 ++ urdf_parser/CMakeLists.txt | 63 ++++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b46ecc76..09e65ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ message (STATUS "${PROJECT_NAME} version ${URDF_VERSION}") include(GNUInstallDirs) +option(BUILD_APPS "Build applications" ON) +option(BUILD_TESTING "Build tests" OFF) option(APPEND_PROJECT_NAME_TO_INCLUDEDIR "When ON headers are installed to a folder ending with an extra ${PROJECT_NAME}. \ This avoids include directory search order issues when overriding this package diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt index 5d2a26a7..610f6e94 100644 --- a/urdf_parser/CMakeLists.txt +++ b/urdf_parser/CMakeLists.txt @@ -83,41 +83,44 @@ target_link_libraries(urdf_parser INTERFACE urdfdom::urdfdom_world) # -------------------------------- +if(BUILD_APPS) + add_executable(check_urdf src/check_urdf.cpp) + target_include_directories(check_urdf PUBLIC include) + target_link_libraries(check_urdf urdfdom_model urdfdom_world) + + # Deprecated executable + add_executable(urdf_to_graphiz src/urdf_to_graphviz.cpp) + target_link_libraries(urdf_to_graphiz urdfdom_model) + + add_executable(urdf_to_graphviz src/urdf_to_graphviz.cpp) + target_include_directories(urdf_to_graphviz PUBLIC include) + target_link_libraries(urdf_to_graphviz urdfdom_model) + + # urdf_mem_test is a binary for testing, not a unit test + add_executable(urdf_mem_test test/memtest.cpp) + target_include_directories(urdf_mem_test PUBLIC include) + target_link_libraries(urdf_mem_test urdfdom_model) +endif() -add_executable(check_urdf src/check_urdf.cpp) -target_include_directories(check_urdf PUBLIC include) -target_link_libraries(check_urdf urdfdom_model urdfdom_world) - -# Deprecated executable -add_executable(urdf_to_graphiz src/urdf_to_graphviz.cpp) -target_link_libraries(urdf_to_graphiz urdfdom_model) - -add_executable(urdf_to_graphviz src/urdf_to_graphviz.cpp) -target_include_directories(urdf_to_graphviz PUBLIC include) -target_link_libraries(urdf_to_graphviz urdfdom_model) - -# urdf_mem_test is a binary for testing, not a unit test -add_executable(urdf_mem_test test/memtest.cpp) -target_include_directories(urdf_mem_test PUBLIC include) -target_link_libraries(urdf_mem_test urdfdom_model) - -include(CTest) if(BUILD_TESTING) + include(CTest) # TODO: check Shane's comment https://github.com/ros/urdfdom/pull/157/files#r664960227 add_subdirectory(test) endif() -INSTALL( - TARGETS - check_urdf - urdf_to_graphiz - urdf_to_graphviz - urdf_mem_test - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -) -INSTALL( +if(BUILD_APPS) + install( + TARGETS + check_urdf + urdf_to_graphiz + urdf_to_graphviz + urdf_mem_test + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() +install( TARGETS urdfdom_model urdfdom_world @@ -137,4 +140,4 @@ install( FILE "urdfdomExport.cmake" ) -INSTALL(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) From 0d57de8846e0415264b517f7e502d3b6a04643b1 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 09:47:33 +0200 Subject: [PATCH 04/12] Prefer find_dependency() in urdfdom-config.cmake Signed-off-by: Martin Valgur --- cmake/urdfdom-config.cmake.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index ee84f41d..25a76c21 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -35,10 +35,11 @@ foreach(lib @PKG_LIBRARIES@) list(APPEND @PKG_NAME@_TARGETS @PROJECT_NAME@::${lib}) endforeach() -find_package(tinyxml2_vendor QUIET) +include(CMakeFindDependencyMacro) +find_dependency(tinyxml2_vendor QUIET) foreach(dep @PKG_DEPENDS@) if(NOT ${dep}_FOUND) - find_package(${dep}) + find_dependency(${dep}) endif() list(APPEND @PKG_NAME@_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS}) list(APPEND @PKG_NAME@_LIBRARIES ${${dep}_LIBRARIES}) From 075d98300286a71677a085a067acf948e27c367d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 10:44:09 +0200 Subject: [PATCH 05/12] No need to enable C language in project() Signed-off-by: Martin Valgur --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09e65ec9..a4c02cc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required( VERSION 3.5 FATAL_ERROR ) -project (urdfdom CXX C) +project (urdfdom CXX) set (URDF_MAJOR_VERSION 4) set (URDF_MINOR_VERSION 0) @@ -29,8 +29,8 @@ if (NOT CMAKE_BUILD_TYPE) endif() # If compiler support symbol visibility, enable it. -include(CheckCCompilerFlag) -check_c_compiler_flag(-fvisibility=hidden HAS_VISIBILITY) +include(CheckCXXCompilerFlag) +check_cxx_compiler_flag(-fvisibility=hidden HAS_VISIBILITY) if (HAS_VISIBILITY) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") endif() From a2fbb27aa12a067a040044b72e1b06d36264c334 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Wed, 28 Feb 2024 11:33:20 +0200 Subject: [PATCH 06/12] Add USE_VENDORED_DEPS option, set urdfdom_LIBRARIES to targets Signed-off-by: Martin Valgur --- CMakeLists.txt | 11 +++++++---- cmake/urdfdom-config.cmake.in | 26 ++++++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4c02cc5..7530fd2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,7 @@ include(GNUInstallDirs) option(BUILD_APPS "Build applications" ON) option(BUILD_TESTING "Build tests" OFF) +option(USE_VENDORED_DEPS "Use vendored dependencies" ON) option(APPEND_PROJECT_NAME_TO_INCLUDEDIR "When ON headers are installed to a folder ending with an extra ${PROJECT_NAME}. \ This avoids include directory search order issues when overriding this package @@ -47,11 +48,13 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -find_package(tinyxml2_vendor QUIET) -find_package(TinyXML2 REQUIRED) - find_package(urdfdom_headers 1.0 REQUIRED) -find_package(console_bridge_vendor QUIET) # Provides console_bridge 0.4.0 on platforms without it. + +if(USE_VENDORED_DEPS) + find_package(tinyxml2_vendor QUIET) + find_package(console_bridge_vendor QUIET) # Provides console_bridge 0.4.0 on platforms without it. +endif() +find_package(TinyXML2 REQUIRED) find_package(console_bridge REQUIRED) # Control where libraries and executables are placed during the build diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index 25a76c21..ee018b1f 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -8,16 +8,16 @@ set(@PKG_NAME@_CONFIG_INCLUDED TRUE) set(CMAKE_MODULE_PATH_BACKUP_URDFDOM ${CMAKE_MODULE_PATH}) 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@") +set(@PKG_NAME@_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") foreach(lib @PKG_LIBRARIES@) set(onelib "${lib}-NOTFOUND") set(onelibd "${lib}-NOTFOUND") find_library(onelib ${lib} - PATHS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_LIBDIR@" + PATHS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@" NO_DEFAULT_PATH) find_library(onelibd ${lib}d - PATHS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_LIBDIR@" + PATHS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@" NO_DEFAULT_PATH) if(onelib-NOTFOUND AND onelibd-NOTFOUND) message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly") @@ -36,17 +36,31 @@ foreach(lib @PKG_LIBRARIES@) endforeach() include(CMakeFindDependencyMacro) -find_dependency(tinyxml2_vendor QUIET) +if(@USE_VENDORED_DEPS@) + find_dependency(tinyxml2_vendor QUIET) + find_dependency(console_bridge_vendor QUIET) +else() + find_dependency(TinyXML2 REQUIRED) + find_dependency(console_bridge REQUIRED) +endif() foreach(dep @PKG_DEPENDS@) if(NOT ${dep}_FOUND) find_dependency(${dep}) endif() - list(APPEND @PKG_NAME@_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS}) - list(APPEND @PKG_NAME@_LIBRARIES ${${dep}_LIBRARIES}) 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() +list(APPEND @PKG_NAME@_INCLUDE_DIRS "${urdfdom_headers_INCLUDE_DIRS}") + foreach(exp @PKG_EXPORTS@) include(${@PROJECT_NAME@_DIR}/${exp}Export.cmake) endforeach() +set(@PKG_NAME@_LIBRARIES ${@PKG_NAME@_TARGETS}) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_BACKUP_URDFDOM}) From fbb24ab667c5881841a7a5b2b76b4e315168f0aa Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 09:51:29 +0200 Subject: [PATCH 07/12] config.cmake: find urdfdom_headers directly, drop target creation Signed-off-by: Martin Valgur --- 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@) From df01ca834dc043742ce200f5dd53ca9cb4cf974d Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 09:59:33 +0200 Subject: [PATCH 08/12] config.cmake: avoid using `${PACKAGE_PREFIX_DIR}` directly Signed-off-by: Martin Valgur --- CMakeLists.txt | 1 + cmake/urdfdom-config.cmake.in | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb025a4d..9e357867 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ write_basic_package_version_file( configure_package_config_file("${cmake_conf_file}.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${cmake_conf_file}.cmake" INSTALL_DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} + PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${cmake_conf_file}.cmake" diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index 2905cdfa..41b6e39b 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -8,16 +8,16 @@ set(@PKG_NAME@_CONFIG_INCLUDED TRUE) set(CMAKE_MODULE_PATH_BACKUP_URDFDOM ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH "${@PROJECT_NAME@_DIR}") -set(@PKG_NAME@_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") +set(@PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") foreach(lib @PKG_LIBRARIES@) set(onelib "${lib}-NOTFOUND") set(onelibd "${lib}-NOTFOUND") find_library(onelib ${lib} - PATHS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@" + PATHS "@PACKAGE_CMAKE_INSTALL_LIBDIR@" NO_DEFAULT_PATH) find_library(onelibd ${lib}d - PATHS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@" + PATHS "@PACKAGE_CMAKE_INSTALL_LIBDIR@" NO_DEFAULT_PATH) if(onelib-NOTFOUND AND onelibd-NOTFOUND) message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly") From 9492c5a9368b3a895bfdec1524e4dfb9b957fad0 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 10:08:01 +0200 Subject: [PATCH 09/12] config.cmake: take APPEND_PROJECT_NAME_TO_INCLUDEDIR into account Signed-off-by: Martin Valgur --- cmake/urdfdom-config.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index 41b6e39b..7e6b57cb 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -9,6 +9,9 @@ set(CMAKE_MODULE_PATH_BACKUP_URDFDOM ${CMAKE_MODULE_PATH}) list(APPEND CMAKE_MODULE_PATH "${@PROJECT_NAME@_DIR}") set(@PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") +if(@APPEND_PROJECT_NAME_TO_INCLUDEDIR@) + list(APPEND @PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/..") +endif() foreach(lib @PKG_LIBRARIES@) set(onelib "${lib}-NOTFOUND") From fed22abd627c7f926300cf3ae9631bddd517753a Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 12:24:58 +0200 Subject: [PATCH 10/12] config.cmake: drop onelib target Signed-off-by: Martin Valgur --- cmake/urdfdom-config.cmake.in | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index 7e6b57cb..ebdfdfa0 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -14,27 +14,6 @@ if(@APPEND_PROJECT_NAME_TO_INCLUDEDIR@) endif() foreach(lib @PKG_LIBRARIES@) - set(onelib "${lib}-NOTFOUND") - set(onelibd "${lib}-NOTFOUND") - find_library(onelib ${lib} - PATHS "@PACKAGE_CMAKE_INSTALL_LIBDIR@" - NO_DEFAULT_PATH) - find_library(onelibd ${lib}d - PATHS "@PACKAGE_CMAKE_INSTALL_LIBDIR@" - NO_DEFAULT_PATH) - if(onelib-NOTFOUND AND onelibd-NOTFOUND) - message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly") - endif() - if(onelib AND onelibd) - list(APPEND @PKG_NAME@_LIBRARIES $<$>:${onelib}>) - list(APPEND @PKG_NAME@_LIBRARIES $<$:${onelibd}>) - else() - if(onelib) - list(APPEND @PKG_NAME@_LIBRARIES ${onelib}) - else() - list(APPEND @PKG_NAME@_LIBRARIES ${onelibd}) - endif() - endif() list(APPEND @PKG_NAME@_TARGETS @PROJECT_NAME@::${lib}) endforeach() From c11bd1c6ece88e394d6fd161ac7628303694a88c Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 29 Feb 2024 12:33:51 +0200 Subject: [PATCH 11/12] config.cmake: don't need to modify CMAKE_MODULE_PATH There are no .cmake modules installed, so it has no effect. Signed-off-by: Martin Valgur --- cmake/urdfdom-config.cmake.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in index ebdfdfa0..51802e08 100644 --- a/cmake/urdfdom-config.cmake.in +++ b/cmake/urdfdom-config.cmake.in @@ -5,9 +5,6 @@ if (@PKG_NAME@_CONFIG_INCLUDED) endif() set(@PKG_NAME@_CONFIG_INCLUDED TRUE) -set(CMAKE_MODULE_PATH_BACKUP_URDFDOM ${CMAKE_MODULE_PATH}) -list(APPEND CMAKE_MODULE_PATH "${@PROJECT_NAME@_DIR}") - set(@PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") if(@APPEND_PROJECT_NAME_TO_INCLUDEDIR@) list(APPEND @PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/..") @@ -34,5 +31,3 @@ foreach(exp @PKG_EXPORTS@) endforeach() set(@PKG_NAME@_LIBRARIES ${@PKG_NAME@_TARGETS}) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_BACKUP_URDFDOM}) From 1512f03750f19fb6d61cfb89b1c76c77cd9fd1d4 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Thu, 11 Jul 2024 13:42:39 +0300 Subject: [PATCH 12/12] Drop `BUILD_TESTING` option from CMakeLists.txt Not needed as it's added automatically by CTest. Signed-off-by: Martin Valgur --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e357867..424cf3f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,6 @@ message (STATUS "${PROJECT_NAME} version ${URDF_VERSION}") include(GNUInstallDirs) option(BUILD_APPS "Build applications" ON) -option(BUILD_TESTING "Build tests" OFF) option(USE_VENDORED_DEPS "Use vendored dependencies" ON) option(APPEND_PROJECT_NAME_TO_INCLUDEDIR "When ON headers are installed to a folder ending with an extra ${PROJECT_NAME}. \