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
|
From: Dima Kogan <dkogan@debian.org>
Date: Sun, 24 Aug 2025 10:04:58 -0700
X-Dgit-Generated: 1.8.8-1 949c1a331fd7f594e77ebcf27afc13c90d6f7a96
Subject: I use the HDF5 library properly:
- For whatever reason, the pkgconf files contain more complete information than
the cmake files, so I use those
- You need -l AND -L. The default build used -l only, which failed to find the
openmpi libhdf5.so library
---
diff --git a/cmake/AlembicHDF5.cmake b/cmake/AlembicHDF5.cmake
index a07c651b..14ad90b3 100644
--- a/cmake/AlembicHDF5.cmake
+++ b/cmake/AlembicHDF5.cmake
@@ -56,7 +56,8 @@ ENDIF()
SET(HDF5_USE_STATIC_LIBRARIES ${USE_STATIC_HDF5})
-FIND_PACKAGE(HDF5 COMPONENTS C)
+FIND_PACKAGE(PkgConfig REQUIRED)
+PKG_CHECK_MODULES(HDF5 hdf5)
#-******************************************************************************
# Wrap it all up
diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt
index 04ec6bb0..e3908c1d 100644
--- a/lib/Alembic/CMakeLists.txt
+++ b/lib/Alembic/CMakeLists.txt
@@ -77,6 +77,7 @@ TARGET_LINK_LIBRARIES(Alembic
${HDF5_LIBRARIES}
${ZLIB_LIBRARY}
)
+TARGET_LINK_DIRECTORIES(Alembic PUBLIC ${HDF5_LIBRARY_DIRS})
INSTALL(TARGETS Alembic
EXPORT AlembicTargets
|