ITK 5.2.0 with system HDF5 - condaforge

Hello,

I am working on updating the conda-forge libitk package for ITK 5.2.0.

The package uses the condo-forge hdf5 library instead of the ITK’s thirdparty HDF5 module. The compilation of ITK is fine. But when testing the install package with a basic hello world example, the HDF5 transitive targets are missing:

CMake Error at CMakeLists.txt:12 (add_executable):
  Target "HelloWorld" links to target "hdf5::hdf5_cpp" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at CMakeLists.txt:12 (add_executable):
  Target "HelloWorld" links to target "hdf5::hdf5" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?

Has anyone else encountered this issue before?

I’m digging into the UseITK CMake stuff in lib/cmake/ITK-5.2 but hoping someone can lend a hand with some additional experience encountering this issue.

Thanks,
Brad

To get the usage to work with the HDF5 library in conda-forge the following line is needed HDF5 export code:

find_package(HDF5 REQUIRED COMPONENTS CXX C)

Hi Brad

is this related to HDF5 conflicts · Issue #26 · conda-forge/itk-feedstock (github.com)? I guess your work would fix that issue in any case, so that’d be great!

Do I understand it correctly that you say it needs a fix in ITK?

thanks a lot
Kris

Hello,

I don’t think it will. The itk-feedstock just provides the ITK Python bindings and it a repackaging of the PyPI packages, so it does not depend on other conda packages.

The libitk-feedstock provides both the libitk runtime libraries and the libitk-devel headers neither of which irk-feedstock uses.

I have made a PR for the changes to ITK: