Package: cmake-data
Version: 3.0.2-1
Severity: normal
Tags: upstream

Dear Maintainer,

Recently (or, maybe not that recently), Debian has shifted from installing one
libhdf5-dev package with /usr/include/hdf5.h to providing multiple
co-installable packages which give /usr/include/hdf5/<version>/hdf5.h.

But FindHDF5.cmake does not support these practices and will not find these
versions of hdf5, regardless of the environment variable HDF5_ROOT.

For my own particular project, I have worked around this by using pkgconfig to
check for the preferred HDF5 version as specified by the Debian alternatives
system.  The code I have used is below, and could be adapted into a patch:

----
if (NOT HDF5_FOUND)
  find_package(PkgConfig)
  if (PKG_CONFIG_FOUND)
    pkg_check_modules(HDF5 hdf6)
    # But using pkgconfig is a little weird because HDF5_LIBRARIES won't be
    # filled with exact library paths, like the other scripts.  So instead
    # what we get is HDF5_LIBRARY_DIRS which is the equivalent of what we'd
    # pass to -L.  So we have to add those...
    if (HDF5_FOUND)
      link_directories("${HDF5_LIBRARY_DIRS}")
    endif()
  endif()
endif()
----

Potentially this issue should have been filed upstream, but I have chosen to
file it here as the issue is specific to Debian and derivatives which use the
same unusual hdf5 packaging scheme.

Thanks!

Ryan

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to