|
7 | 7 | # The full license is in the file LICENSE, distributed with this software. # |
8 | 8 | ############################################################################ |
9 | 9 |
|
10 | | -cmake_minimum_required(VERSION 3.8) |
| 10 | +cmake_minimum_required(VERSION 3.30) |
11 | 11 | project(xtensor-io) |
12 | 12 |
|
13 | 13 | set(XTENSOR_IO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) |
@@ -121,6 +121,7 @@ endforeach() |
121 | 121 | set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/modules") |
122 | 122 |
|
123 | 123 | add_library(xtensor-io INTERFACE) |
| 124 | +target_compile_features(xtensor-io INTERFACE cxx_std_17) |
124 | 125 |
|
125 | 126 | include_directories(${GTEST_INCLUDE_DIRS}) |
126 | 127 |
|
@@ -197,18 +198,8 @@ endif() |
197 | 198 |
|
198 | 199 | if(HAVE_HighFive) |
199 | 200 | find_package(HighFive REQUIRED) |
200 | | - find_package(HDF5 REQUIRED) |
201 | | - message(STATUS "HighFive ${HighFive_VERSION} and HDF5 ${HDF5_VERSION} found, HDF5 file support enabled") |
202 | | - find_package(HDF5 REQUIRED) |
203 | | - get_target_property(HighFive_INCLUDE_DIRECTORIES_EXTRACTED HighFive INTERFACE_INCLUDE_DIRECTORIES) |
204 | | - target_include_directories(xtensor-io |
205 | | - INTERFACE |
206 | | - ${HighFive_INCLUDE_DIRECTORIES_EXTRACTED} |
207 | | - ) |
208 | | - target_link_libraries(xtensor-io |
209 | | - INTERFACE |
210 | | - ${HDF5_LIBRARIES} |
211 | | - ) |
| 201 | + message(STATUS "HighFive ${HighFive_VERSION} found, HDF5 file support enabled") |
| 202 | + target_link_libraries(xtensor-io INTERFACE HighFive::HighFive) |
212 | 203 | else() |
213 | 204 | message(STATUS "HighFive not enabled: use -DHAVE_HighFive=ON for HDF5 file support") |
214 | 205 | endif() |
@@ -245,15 +236,11 @@ else() |
245 | 236 | endif() |
246 | 237 |
|
247 | 238 | if(HAVE_storage_client) |
248 | | - find_package(storage_client REQUIRED) |
249 | | - message(STATUS "storage_client ${storage_client_VERSION} found, Google Cloud Storage IO handler support enabled") |
250 | | - target_include_directories(xtensor-io |
251 | | - INTERFACE |
252 | | - ${storage_client_INCLUDE_DIRS} |
253 | | - ) |
| 239 | + find_package(google_cloud_cpp_storage REQUIRED) |
| 240 | + message(STATUS "google_cloud_cpp_storage ${google_cloud_cpp_storage_VERSION} found, Google Cloud Storage IO handler support enabled") |
254 | 241 | target_link_libraries(xtensor-io |
255 | 242 | INTERFACE |
256 | | - storage_client |
| 243 | + google-cloud-cpp::storage |
257 | 244 | ) |
258 | 245 | else() |
259 | 246 | message(STATUS "storage_client not enabled: use -DHAVE_storage_client=ON for Google Cloud Storage IO handler support") |
|
0 commit comments