From bf135ef4bcda2a6e897a00d4001bfe0c4acb1c45 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 29 Feb 2024 20:29:58 +0100 Subject: [PATCH] CMakeLists.txt: dont include base (#673) * CMakeLists.txt: dont include base * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c60a3eb5..27f4a69ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,15 +3,20 @@ cmake_minimum_required(VERSION 3.10) set(PROJECT_NAME "jrl-cmakemodules") set(PROJECT_DESCRIPTION "CMake utility toolbox") set(PROJECT_URL "http://github.com/jrl-umi3218/${PROJECT_NAME}") -set(PROJECT_USE_CMAKE_EXPORT ON) -option(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF) +project( + ${PROJECT_NAME} + DESCRIPTION ${PROJECT_DESCRIPTION} + LANGUAGES CXX + VERSION 0.0.0) -set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}") -include(base.cmake) -compute_project_args(PROJECT_ARGS) -project(${PROJECT_NAME} ${PROJECT_ARGS}) +# Generate CMake exports +include(GNUInstallDirs) +include(package-config.cmake) +set(PROJECT_JRL_CMAKE_MODULE_DIR ${CMAKE_CURRENT_LIST_DIR}) +setup_project_package_finalize() +# Add a dummy library with a useful INTERFACE_INCLUDE_DIRECTORIES add_library(${PROJECT_NAME} INTERFACE) set(INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}") target_include_directories(${PROJECT_NAME}