gentoo-ebuilds/sci-visualization/kst/files/kst-2.1.0_p20250415-cmake-findhdf5.patch
Andreas Sturmlechner 1d3a60bd4f
sci-visualization/kst: Use upstream FindHDF5.cmake module
And make some minor adjustments so it actually gets picked up.

Closes: https://bugs.gentoo.org/954233
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-04-23 19:50:19 +02:00

43 lines
1.3 KiB
Diff

From 58ea6c63dd800ebeb9f0b12744e4de87e8d372b5 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 +-
src/datasources/CMakeLists.txt | 6 +--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc84fbf0..db9c09fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,7 +166,7 @@ if(kst_3rdparty)
find_package(Matio)
find_package(CFITSIO)
find_package(LibTiff)
- find_package(HDF5)
+ find_package(HDF5 COMPONENTS CXX)
message(STATUS "----------------------------------------------")
else()
message(STATUS "Building plugins depending on 3rd party libraries suppressed")
diff --git a/src/datasources/CMakeLists.txt b/src/datasources/CMakeLists.txt
index f72c44b0..12da98c8 100644
--- a/src/datasources/CMakeLists.txt
+++ b/src/datasources/CMakeLists.txt
@@ -73,8 +73,8 @@ if(tiff)
kst_link(${TIFF_LIBRARIES})
endif()
-if(hdf5)
- include_directories(${HDF5_INCLUDEDIR})
+if(HDF5_FOUND)
+ include_directories(${HDF5_CXX_INCLUDE_DIRS})
kst_add_plugin(. hdf5)
- kst_link(${HDF5_LIBRARIES})
+ kst_link(${HDF5_CXX_LIBRARIES})
endif()
--
2.49.0