FindHDF5 library order might be wrong
When using the compiler wrapper, FindHDF5 first detects libraries with
-l* and then those with the full path.
Unfortunately, this changes the behaviour compared with the wrapper as
-l* libraries (typically dependancies of HDF5) are seen first on the command line and only then full path ones (typically HDF5 libs when using the static version)
One way to solve that would be to have a single loop to iterate over both and a test for the current case inside the loop. I can provide a patch if that sounds right with you.