Since your problem appears to be libgit2 (or possibly a missing library that it wants) you may want to try the build in this post:
When I originally wrote this howto VCPKG for libgit2 didn’t work, it appears they fixed it up so it does work now and may be the way forward. There should also be my notes on how I built libgit2 without VCPKG (essentially you need to tell cmake to use VS as a 64bit binary, without that it creates a 32 bit binary which QT rejects.)
Peter