Dear Maintainer,
our package CamiTK does not build since the update to ITK 5.4.7. While
troubleshooting the issue, we noticed that this is caused by VTK and ITK
requesting the same library: HDF5.
VTK uses a custom, older FindHDF5.cmake, while ITK uses the system one.
The CMake variables defined by the two FindHDF5.cmake are different,
which leads to an error at the configure step about not finding HDF5.
Our package does not require HDF5 except through VTK and ITK.
The curent workaround we are considering is to require it before asking
for VTK and ITK in our CMake files.
Here is a minimal example of a CMakeLists.txt file that shows the issue:
cmake_minimum_required(VERSION 3.28)
project(HDF5Issue)
# FIX: find_package(HDF5 COMPONENTS C HL)
find_package(VTK REQUIRED COMPONENTS CommonCore)
find_package(ITK REQUIRED)
Configuring the project ("cmake -S . --build build") in the directory
with this CMakeLists.txt generates an error identical to the one in our package: