Do you *prefer* static linking?
Else change this to
```bash
# check if static version of HDF5 is available
SET(HDF5_HAS_STATIC 0)
```