Qt 6.2 introduced Windows on Arm support (
Presumably, this is done so that it is possible to cross-compile an ARM64 binary from a x64 machine. However, this prevents me from setting up vcpkg within my Qt project. Is there a way to get around this issue? Does CMake support multiple toolchain files or is there an alternative setup for my scenario?
CodePudding user response:
I found out that VCPKG provides a way to achieve this as explained here:
To use an external toolchain file with a project using vcpkg, you can set the cmake variable VCPKG_CHAINLOAD_TOOLCHAIN_FILE on the configure line:
cmake ../my/project \
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=../my/project/compiler-settings-toolchain.cmake
So in my case, I can just qt toolchain file using VCPKG_CHAINLOAD_TOOLCHAIN_FILE option.