File tree Expand file tree Collapse file tree 5 files changed +22
-12
lines changed
Expand file tree Collapse file tree 5 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.24)
22
33project (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."
1919if (UZUKI2_FETCH_EXTERN)
2020 add_subdirectory (extern)
2121else ()
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)
2525endif ()
2626
2727target_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+
6973install (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-
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ target_link_libraries(myexe uzuki2)
106106target_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
111115You 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)
123127target_link_libraries(mylib INTERFACE artifactdb::uzuki2)
124128```
125129
130+ Again, this will use ` FetchContent ` to fetch dependencies, see comments above.
131+
126132#### Manual
127133
128134If you're not using CMake, the simple approach is to just copy the files in the ` include/ ` subdirectory -
Original file line number Diff line number Diff line change 11@PACKAGE_INIT@
22
33include (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
88if (@UZUKI2_FIND_HDF5@)
99 find_package (HDF5 COMPONENTS C CXX)
Original file line number Diff line number Diff line change @@ -5,19 +5,19 @@ include(FetchContent)
55FetchContent_Declare(
66 byteme
77 GIT_REPOSITORY https://github.com/LTLA/byteme
8- GIT_TAG master
8+ GIT_TAG master #^2.0.0
99)
1010
1111FetchContent_Declare(
1212 millijson
1313 GIT_REPOSITORY https://github.com/ArtifactDB/millijson
14- GIT_TAG master
14+ GIT_TAG master #^2.0.0
1515)
1616
1717FetchContent_Declare(
1818 ritsuko
1919 GIT_REPOSITORY https://github.com/ArtifactDB/ritsuko
20- GIT_TAG master
20+ GIT_TAG master #^0.6.0
2121)
2222
2323FetchContent_MakeAvailable(byteme)
Original file line number Diff line number Diff line change 11include (FetchContent)
22FetchContent_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
You can’t perform that action at this time.
0 commit comments