How to build Qt version >12 for Jetson Nano or Xavier AGX Developer Kits

I need to use Qt version 5.12 (or newer) for Jetson Nano and Xavier AGX. The default Qt vesion is 5.9.5 which lacks some features critical for my project. I tried to build Qt 5.12.9 from source without success. Any help will be appreciated.