From b966b87ce05e9ea46361d57e86f691d479bfedef Mon Sep 17 00:00:00 2001 From: LTLA Date: Thu, 18 Jul 2024 12:58:07 -0700 Subject: [PATCH] Bumped version for new release, added more versioning information. Also fixed the test config to avoid unnecessary coverage reporting. --- CMakeLists.txt | 13 +++++++++---- cmake/Config.cmake.in | 2 +- extern/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 378ae73..ded9b62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.24) project(kaori - VERSION 1.1.1 + VERSION 1.1.2 DESCRIPTION "Header-only C++ library for screen counting" LANGUAGES CXX) @@ -11,6 +11,8 @@ add_library(kaori INTERFACE) add_library(crisprverse::kaori ALIAS kaori) include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + target_include_directories(kaori INTERFACE "$" "$") @@ -19,7 +21,7 @@ option(KAORI_FETCH_EXTERN "Automatically fetch kaori's external dependencies." O if(KAORI_FETCH_EXTERN) add_subdirectory(extern) else() - find_package(ltla_byteme CONFIG REQUIRED) + find_package(ltla_byteme 1.0.0 CONFIG REQUIRED) endif() target_link_libraries(kaori INTERFACE ltla::byteme) @@ -39,8 +41,6 @@ if(KAORI_TESTS) endif() # Installing for find_package. -include(CMakePackageConfigHelpers) - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/crisprverse_kaori) @@ -56,5 +56,10 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/crisprverse_kaoriConfig.cmake" INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/crisprverse_kaori) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/crisprverse_kaoriConfigVersion.cmake" + COMPATIBILITY SameMajorVersion) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/crisprverse_kaoriConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/crisprverse_kaoriConfigVersion.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/crisprverse_kaori) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index b6d4288..7bd158a 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -1,6 +1,6 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(ltla_byteme CONFIG REQUIRED) +find_dependency(ltla_byteme 1.0.0 CONFIG REQUIRED) include("${CMAKE_CURRENT_LIST_DIR}/crisprverse_kaoriTargets.cmake") diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 1482855..c07fbd6 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -3,7 +3,7 @@ include(FetchContent) FetchContent_Declare( byteme GIT_REPOSITORY https://github.com/LTLA/byteme - GIT_TAG master + GIT_TAG master # ^1.0.0 ) FetchContent_MakeAvailable(byteme)