I think that using intermediate makefile in building is more universal (but, is slower).
And this concept allows to change engine that generates makefile.
I understand that it is not easy to do this, and can be another way to decide this problem (this problem only with Qt) - this only thoughts.
Good luck!