Hello,
My answer is not an immediate solution to your issue, but you may be interested in building your project and all its dependencies from the ground up with Conan 2. The advantage of this dependency management system is that it can build dependencies using different build systems (CMake, Autotools, JOM, etc.). In Conan, the dependencies are built via Python scripts called recipes. If you want, you can take a look at the recipes tailored for my project here ( gammaray/conan2_recipes at build_with_conan · PauloCarvalhoRJ/gammaray · GitHub) or the generic ones (includes Qt 6.x.y versions) in Conan Center ( Search Result - Conan 2.0: C and C++ Open Source Package Manager).
all the best,
PC