Skip to content

Commit

Permalink
Bumped version for a new release.
Browse files Browse the repository at this point in the history
We configure the version file for downstream CMake-based dependencies.
We also specify the minimum version requirement for tatami_chunked.
  • Loading branch information
LTLA committed May 22, 2024
1 parent 3e8f849 commit f69aaf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.24)

project(tatami_hdf5
VERSION 1.0.2
VERSION 2.0.0
DESCRIPTION "tatami bindings for HDF5"
LANGUAGES CXX)

Expand All @@ -14,7 +14,7 @@ option(TATAMI_HDF5_FETCH_EXTERN "Automatically fetch tatami_hdf5's external depe
if(TATAMI_HDF5_FETCH_EXTERN)
add_subdirectory(extern)
else()
find_package(tatami_tatami_chunked CONFIG REQUIRED)
find_package(tatami_tatami_chunked 2.0.0 CONFIG REQUIRED)
endif()

target_link_libraries(tatami_hdf5 INTERFACE tatami::tatami_chunked)
Expand Down Expand Up @@ -68,5 +68,10 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/tatami_tatami_hdf5Config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tatami_tatami_hdf5)

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/tatami_tatami_hdf5ConfigVersion.cmake
COMPATIBILITY SameMajorVersion)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tatami_tatami_hdf5Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/tatami_tatami_hdf5ConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tatami_tatami_hdf5)
3 changes: 2 additions & 1 deletion cmake/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(tatami_tatami_chunked CONFIG REQUIRED)
find_dependency(tatami_tatami_chunked 2.0.0 CONFIG REQUIRED)

if(@TATAMI_HDF5_FIND_HDF5@)
# Not REQUIRED, so don't use find_dependency according to
# https://stackoverflow.com/questions/64846805/how-do-i-specify-an-optional-dependency-in-a-cmake-package-configuration-file
Expand Down
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
tatami_chunked
GIT_REPOSITORY https://github.com/tatami-inc/tatami_chunked
GIT_TAG master
GIT_TAG master # ^v2.0.0
)

FetchContent_MakeAvailable(tatami_chunked)
Expand Down

0 comments on commit f69aaf5

Please sign in to comment.