FindHDF5: Handle HDF5 builds with non-suffixed components

This commit is contained in:
Robert Maynard 2016-06-23 10:57:58 -04:00
parent f30b0fec74
commit 149539d9c2
1 changed files with 7 additions and 0 deletions

View File

@ -362,6 +362,13 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(_suffix "-shared")
endif()
foreach(_lang ${HDF5_LANGUAGE_BINDINGS})
#Older versions of hdf5 don't have a static/shared suffix so
#if we detect that occurrence clear the suffix
if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix})
set(_suffix "")
endif()
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
if( _lang_location )
set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH