More portability fixes
I've added the changes from heif_file.cc (8c5465e), but I did not merge the other changes, because they seem to introduce a lot of changes in the CMake file without clearly stating why this is necessary.
Most of the CMake changes are whitespace/indentation. The rest are more standard ways of looking for JPEG and PNG libraries that will only improve maintainability, so I highly recommend you revisit them.
Is this PR still necessary after the rewrite of the CMakeLists.txt in 8e9cfc8e568267bcc79d7d471fb9cd16a471615c ? Anything that I missed?
I'll take a look in the coming days, and either rebase or close.
The CMakeLists.txt changes have been indeed addressed by https://github.com/strukturag/libheif/commit/8e9cfc8e568267bcc79d7d471fb9cd16a471615c, so the only thing left is the examples/heif_convert.cc change (cosmetic really, and brings it in line with examples/heif_thumbnailer.cc
Thanks for reviewing this.