# ITK 5.2.0 with system HDF5 - condaforge

**URL:** https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130
**Category:** Engineering
**Created:** [May 13, 2021, 1:17pm UTC](https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130 "2021-05-13T13:17:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [May 13, 2021, 1:17pm UTC](https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130/1 "2021-05-13T13:17:48Z")

</div>

Hello,

I am working on updating the [conda-forge libitk](https://github.com/conda-forge/libitk-feedstock) 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](https://github.com/conda-forge/libitk-feedstock/blob/master/recipe/example/CMakeLists.txt), the HDF5 transitive targets are missing:

```auto
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

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [May 13, 2021, 6:41pm UTC](https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130/2 "2021-05-13T18:41:34Z")

</div>

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

```auto
find_package(HDF5 REQUIRED COMPONENTS CXX C)

```

---

<div class="post-metadata">

### Author: ![KrisThielemans](https://discourse.itk.org/user_avatar/discourse.itk.org/kristhielemans/32/1633_2.png) [@KrisThielemans](https://discourse.itk.org/u/KrisThielemans)
#### Post date: [May 14, 2021, 7:45am UTC](https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130/3 "2021-05-14T07:45:43Z")

</div>

Hi Brad

is this related to [HDF5 conflicts · Issue #26 · conda-forge/itk-feedstock (github.com)](https://github.com/conda-forge/itk-feedstock/issues/26)? 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

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [May 14, 2021, 1:03pm UTC](https://discourse.itk.org/t/itk-5-2-0-with-system-hdf5-condaforge/4130/4 "2021-05-14T13:03:45Z")

</div>

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:

> <https://github.com/InsightSoftwareConsortium/ITK/pull/2530>
>
> Addresses instalation issue with ITK\_USE\_SYSTEM\_HDF5 with a system HDF5 that doe…s not provide a HDF5Config.cmake file. The wrong find\_package signature was being generated in the ITKHDF5.cmake file.
> 
> 
> This change is also needed in the release branch.
