Skip to content

Commit c2b0a59

Browse files
committed
Various version-related modifications:
- Updated versions of all dependencies. - Bumped version for new release. - Added a version file for Cmake installation. - Updated version of Googletest to avoid Cmake warnings.
1 parent 14029b0 commit c2b0a59

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.24)
22

33
project(uzuki2
4-
VERSION 1.5.0
4+
VERSION 2.0.0
55
DESCRIPTION "Storing simple R lists inside HDF5 or JSON"
66
LANGUAGES CXX)
77

@@ -19,9 +19,9 @@ option(UZUKI2_FETCH_EXTERN "Automatically fetch uzuki2's external dependencies."
1919
if(UZUKI2_FETCH_EXTERN)
2020
add_subdirectory(extern)
2121
else()
22-
find_package(ltla_byteme CONFIG REQUIRED)
23-
find_package(ltla_millijson CONFIG REQUIRED)
24-
find_package(artifactdb_ritsuko CONFIG REQUIRED)
22+
find_package(ltla_byteme 2.0.0 CONFIG REQUIRED)
23+
find_package(ltla_millijson 2.0.0 CONFIG REQUIRED)
24+
find_package(artifactdb_ritsuko 0.6.0 CONFIG REQUIRED)
2525
endif()
2626

2727
target_link_libraries(uzuki2 INTERFACE ltla::byteme ltla::millijson artifactdb::ritsuko)
@@ -66,6 +66,10 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in
6666
"${CMAKE_CURRENT_BINARY_DIR}/artifactdb_uzuki2Config.cmake"
6767
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/artifactdb_uzuki2)
6868

69+
write_basic_package_version_file(
70+
"${CMAKE_CURRENT_BINARY_DIR}/artifactdb_uzuki2ConfigVersion.cmake"
71+
COMPATIBILITY SameMajorVersion)
72+
6973
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/artifactdb_uzuki2Config.cmake"
74+
"${CMAKE_CURRENT_BINARY_DIR}/artifactdb_uzuki2ConfigVersion.cmake"
7075
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/artifactdb_uzuki2)
71-

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ target_link_libraries(myexe uzuki2)
106106
target_link_libraries(mylib INTERFACE uzuki2)
107107
```
108108

109+
By default, this will use `FetchContent` to fetch all external dependencies.
110+
Applications are advised to pin the versions of all dependencies themselves - see [`extern/CMakeLists.txt`](extern/CMakeLists.txt) for suggested versions.
111+
If you want to install them manually, use `-DUZUKI2_FETCH_EXTERN=OFF`.
112+
109113
#### CMake with `find_package()`
110114

111115
You can install the library by cloning a suitable version of this repository and running the following commands:
@@ -123,6 +127,8 @@ find_package(artifactdb_uzuki2 CONFIG REQUIRED)
123127
target_link_libraries(mylib INTERFACE artifactdb::uzuki2)
124128
```
125129

130+
Again, this will use `FetchContent` to fetch dependencies, see comments above.
131+
126132
#### Manual
127133

128134
If you're not using CMake, the simple approach is to just copy the files in the `include/` subdirectory -

cmake/Config.cmake.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@PACKAGE_INIT@
22

33
include(CMakeFindDependencyMacro)
4-
find_dependency(ltla_millijson CONFIG REQUIRED)
5-
find_dependency(ltla_byteme CONFIG REQUIRED)
6-
find_dependency(artifactdb_ritsuko CONFIG REQUIRED)
4+
find_dependency(ltla_millijson 2.0.0 CONFIG REQUIRED)
5+
find_dependency(ltla_byteme 2.0.0 CONFIG REQUIRED)
6+
find_dependency(artifactdb_ritsuko 0.6.0 CONFIG REQUIRED)
77

88
if(@UZUKI2_FIND_HDF5@)
99
find_package(HDF5 COMPONENTS C CXX)

extern/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ include(FetchContent)
55
FetchContent_Declare(
66
byteme
77
GIT_REPOSITORY https://github.com/LTLA/byteme
8-
GIT_TAG master
8+
GIT_TAG master #^2.0.0
99
)
1010

1111
FetchContent_Declare(
1212
millijson
1313
GIT_REPOSITORY https://github.com/ArtifactDB/millijson
14-
GIT_TAG master
14+
GIT_TAG master #^2.0.0
1515
)
1616

1717
FetchContent_Declare(
1818
ritsuko
1919
GIT_REPOSITORY https://github.com/ArtifactDB/ritsuko
20-
GIT_TAG master
20+
GIT_TAG master #^0.6.0
2121
)
2222

2323
FetchContent_MakeAvailable(byteme)

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include(FetchContent)
22
FetchContent_Declare(
33
googletest
4-
URL https://github.com/google/googletest/archive/c9461a9b55ba954df0489bab6420eb297bed846b.zip
4+
URL https://github.com/google/googletest/archive/7da55820cc32dedd6c1b048f2d4e13fdde5e8237.zip
55
)
66

77
# For Windows: Prevent overriding the parent project's compiler/linker settings

0 commit comments

Comments
 (0)