Windows ARM TP 6.4.0 & 6.3.1: Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
-
Hello,
I tried to build my code using the Qt 6.3.1 & 6.4.0-beta technology preview of Windows ARM architecture. It seems to me that there are missing some parts in the binary distribution held by the Qt MaintenanceTool.
I got the following errors during my project CMAKE execution.
c:\Users\infra\CLionProjects\speedcrunch\build-arm64>set Qt6_DIR=c:\Qt\6.4.0\msvc2019_arm64\lib\cmake\Qt6\ c:\Users\infra\CLionProjects\speedcrunch\build-arm64>"c:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -A arm64 -DCMAKE_BUILD_TYPE=Release -DPORTABLE_SPEEDCRUNCH=on ../src -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR) CMake Warning at C:/Qt/6.4.0/msvc2019_arm64/lib/cmake/Qt6/Qt6Config.cmake:214 (find_package): Found package configuration file: C:/Qt/6.4.0/msvc2019_arm64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be NOT FOUND. Reason given by package: Target "Qt6::Core" was not found. Call Stack (most recent call first): CMakeLists.txt:41 (FIND_PACKAGE)
Unlike the mingw_64 or the msvc2019_64, there is no c:\Qt\6.3.1\msvc2019_arm64\lib\cmake\Qt6CoreTools directory with cmake files inside.
Is this a known bug, or did I miss something for this architecture?
Thanks,
Michal -
Hi.
Currently the Windows ARM Qt binaries assume that you will be cross-compiling to that target and thus require an x86_64 Qt installation for access to host tools.
To specify the location of the host tools, you should configure your project using the CMake toolchain file that the ARM Qt installation provides, e.g.
-DCMAKE_TOOLCHAIN_FILE=c:\Qt\6.3.1\msvc2019_arm64\lib\cmake\Qt6\qt.toolchain.cmake
and point to an x86_64 Qt host installation with-DQT_HOST_PATH=c:\Qt\6.3.1\msvc2019
-
Hi,
Thank you, that works.
Regards,
Michal