From eb2fa71be7b9b1e0525a3d20c8d1a979cf277dcc Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 11 Apr 2024 14:00:39 +0200 Subject: [PATCH 1/2] CMake: allow use of installed jrl-cmakemodule --- CMakeLists.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a689c4606..ba1bf98e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,11 +55,23 @@ option(HPP_FCL_ENABLE_LOGGING "Activate logging for warnings or error messages. # Check if the submodule cmake have been initialized set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake") -if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/base.cmake") - if(${CMAKE_VERSION} VERSION_LESS "3.14.0") +if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake") + message(STATUS "JRL cmakemodules found in 'cmake/' git submodule") +else() + find_package(jrl-cmakemodules QUIET CONFIG) + if(jrl-cmakemodules_FOUND) + get_property( + JRL_CMAKE_MODULES + TARGET jrl-cmakemodules::jrl-cmakemodules + PROPERTY INTERFACE_INCLUDE_DIRECTORIES) + message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}") + elseif(${CMAKE_VERSION} VERSION_LESS "3.14.0") message( FATAL_ERROR - "\nPlease run the following command first:\ngit submodule update --init\n" + "\nCan't find jrl-cmakemodules. Please either:\n" + " - use git submodule: 'git submodule update --init'\n" + " - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n" + " - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n" ) else() message(STATUS "JRL cmakemodules not found. Let's fetch it.") From 0b0a5ac54084393d80dc0071d6f0118c6e5c8ca6 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 11 Apr 2024 14:05:34 +0200 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e71b3ed8..59ee58056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - [#549](https://github.com/humanoid-path-planner/hpp-fcl/pull/549) - Optimize EPA: ignore useless faces in EPA's polytope; warm-start support computation for `Convex`; fix edge-cases witness points computation. - Add `Serializable` trait to transform, collision data, collision geometries, bounding volumes, bvh models, hfields. Collision problems can now be serialized from C++ and sent to python and vice versa. +- CMake: allow use of installed jrl-cmakemodules ([#564](https://github.com/humanoid-path-planner/hpp-fcl/pull/564)) + ### Fixed