From d7857d810ff44d7dfc66ce66186086fb8764c6e4 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 13 Mar 2024 13:31:01 +0100 Subject: [PATCH 1/3] CMake: headers are installed in CMAKE_INSTALL_INCLUDEDIR which might not be "include" --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be43048c9..ca501ed7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,7 @@ add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} target_include_directories( ${PROJECT_NAME} SYSTEM PUBLIC $ - $) + $) modernize_target_link_libraries( ${PROJECT_NAME} From 3ebdd9c8fcf39d2bbdd931475360d6535803451b Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 13 Mar 2024 13:32:35 +0100 Subject: [PATCH 2/3] 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 ca501ed7e..1fc16e5d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,23 @@ set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion) # 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 1110b3e2adc4453a9e2c0406359392903fe4c56a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 13 Mar 2024 13:46:49 +0100 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d518fca47..8edbc9dba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Allow use of installed JRL-cmakemodule ([#446](https://github.com/stack-of-tasks/eigenpy/pull/446) + ### Fixed - Fix unit test build in C++11 ([#442](https://github.com/stack-of-tasks/eigenpy/pull/442)) - Fix unit test function signature [#443](https://github.com/stack-of-tasks/eigenpy/pull/443)) +- Fix CMake export ([#446](https://github.com/stack-of-tasks/eigenpy/pull/446) ## [3.4.0] - 2024-02-26