FindHDF5 fails when multiple imported configurations exist
When FindHDF5
finds config.cmake
, my previous accepted merge request !463 (merged) added code to get details from the imported targets. Unfortunately this has a bug when multiple configurations are found. The relevant lines are
get_target_property(_imported_conf ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_CONFIGURATIONS)
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_imported_conf} )
The 2nd line generates an error
get_target_property called with incorrect number of arguments
To fix this, we presumably have to select a preferred configuration. I'm not sure what the best strategy is for that. @brad.king can you help?
Edited by Brad King