xdmf2-1.0_p141226-cannot-find-hdf5-bug-591302.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Too much automagic trying to find the correct prefix
  2. of HDF5. Remove all the pointless heuristics.
  3. See also: https://bugs.gentoo.org/show_bug.cgi?id=591302
  4. * CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  5. * Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS
  6. * HDF5_HL_LIBRARIES)
  7. --- xdmf2-1.0_p141226/core/CMakeLists.txt
  8. +++ xdmf2-1.0_p141226/core/CMakeLists.txt
  9. @@ -35,19 +35,7 @@
  10. mark_as_advanced(FORCE Boost_INCLUDE_DIR)
  11. endif(Boost_FOUND)
  12. -# Find HDF5_ROOT if not set
  13. -if ("$ENV{HDF5_ROOT}" STREQUAL "")
  14. - find_file (HDF5_LIB libhdf5.so HINTS ENV LD_LIBRARY_PATH)
  15. - if (NOT "${HDF5_LIB}" STREQUAL "")
  16. - get_filename_component(HDF5_LIBRARY_DIR "${HDF5_LIB}" PATH)
  17. - get_filename_component(HDF5_ROOT "${HDF5_LIBRARY_DIR}/../" ABSOLUTE)
  18. - set(ENV{HDF5_ROOT} ${HDF5_ROOT})
  19. - endif (NOT "${HDF5_LIB}" STREQUAL "")
  20. -endif ("$ENV{HDF5_ROOT}" STREQUAL "")
  21. -
  22. -mark_as_advanced(CLEAR HDF5_C_INCLUDE_DIR)
  23. -mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_DEBUG)
  24. -mark_as_advanced(CLEAR HDF5_hdf5_LIBRARY_RELEASE)
  25. +# Find HDF5
  26. find_package(HDF5 REQUIRED)
  27. if(HDF5_FOUND)
  28. mark_as_advanced(FORCE HDF5_C_INCLUDE_DIR)
  29. @@ -73,9 +61,6 @@
  30. endif(HDF5_IS_PARALLEL)
  31. get_filename_component(HDF5_ROOT "${HDF5_INCLUDE_DIR}/../" REALPATH)
  32. set(HDF5_BINARY_DIRS ${HDF5_ROOT}/bin ${HDF5_ROOT}/dll)
  33. - if (NOT HDF5_LIBRARIES)
  34. - find_library (HDF5_LIBRARIES hdf5 HINTS ${HDF5_ROOT} ENV LD_LIBRARY_PATH)
  35. - endif (NOT HDF5_LIBRARIES)
  36. set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${HDF5_LIBRARIES})
  37. set(XDMF_HDF5_BINARY_DIRS ${HDF5_BINARY_DIRS} PARENT_SCOPE)
  38. set(XDMF_BINARIES ${XDMF_BINARIES} ${HDF5_BINARY_DIRS})