blob: 3aa0e7ffddba387f3dc49ac33658f9a89a9f09cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 3244742f3d2bfacd9265c19c7e24be6037a7dc9e Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Wed, 23 Apr 2025 19:07:28 +0200
Subject: [PATCH] Use CMake provided FindHDF5 module
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
CMakeLists.txt | 2 +-
cmake/modules/FindHDF5.cmake | 79 ----------------------------------
src/datasources/CMakeLists.txt | 4 +-
3 files changed, 3 insertions(+), 82 deletions(-)
delete mode 100644 cmake/modules/FindHDF5.cmake
index ec5f0055..339ab3da 100644
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,7 @@ find_package(Netcdf)
find_package(Matio)
find_package(CFITSIO)
find_package(TIFF)
-find_package(HDF5)
+find_package(HDF5 COMPONENTS CXX)
message(STATUS "----------------------------------------------")
message(STATUS)
diff --git a/src/datasources/CMakeLists.txt b/src/datasources/CMakeLists.txt
diff --git a/src/datasources/CMakeLists.txt b/src/datasources/CMakeLists.txt
--- a/src/datasources/CMakeLists.txt
+++ b/src/datasources/CMakeLists.txt
@@ -49,7 +49,7 @@ if(TARGET TIFF::TIFF)
kst_add_plugin(. tiff16source LINK_LIBRARIES TIFF::TIFF) # Directory named after the file format, not the lib
endif()
-if(TARGET HDF5::HDF5)
- include_directories(${HDF5_INCLUDE_DIR})
- kst_add_plugin(. hdf5 LINK_LIBRARIES ${HDF5_LIBRARIES})
+if(HDF5_FOUND)
+ include_directories(${HDF5_CXX_INCLUDE_DIRS})
+ kst_add_plugin(. hdf5 LINK_LIBRARIES ${HDF5_CXX_LIBRARIES})
endif()
--
2.53.0
|