Skip to content
Snippets Groups Projects
Unverified Commit 34be6c76 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #48 from nim65s/devel

update packaging & tooling
parents 49e6e1bb 3d3b39d2
No related branches found
No related tags found
No related merge requests found
Pipeline #37286 passed
......@@ -6,7 +6,7 @@ repos:
hooks:
- id: cmake-format
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.5
rev: v18.1.1
hooks:
- id: clang-format
args:
......
#
# Copyright (c) 2019-2020 CNRS
# Copyright (c) 2019-2024 CNRS
#
# This file is part of eiquadprog.
#
......@@ -37,11 +37,23 @@ set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
# 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.")
......@@ -92,8 +104,8 @@ modernize_target_link_libraries(
Eigen3::Eigen
INCLUDE_DIRS
${EIGEN3_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME}
INTERFACE $<INSTALL_INTERFACE:include>)
target_include_directories(
${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
......
Subproject commit b7a4177f2694c50dc95e64317f1260c7cfae93a3
Subproject commit 3cec22945319a41a15808c84b17d5425b9e9e4dc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment