Reputation: 361
I have a problem when I create a new QtQuick
project with Qt6 android
with CMake
. The CMake fails immediately after the creation of the project:
CMake Error at CMakeLists.txt:28 (find_package):
Found package configuration file:
C:/Qt/6.0.0/android_armv7/lib/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
FOUND. The reason is given by package:
Failed to find Qt component "Core" config file at ""
Failed to find Qt component "Quick" config file at ""
I am on Windows
and this error occurs with every qt6 android kit(x86, x86_64, armv7, arm64).
What is causing this problem? I have tried to solve it and I found similar bugs already reported but still could not find a solution. Any suggestion or help is welcome. Thanks in advance.
UPDATE: I noticed too, that after I install new android kit(for example 5.12.10 x86 and armv7) via MaintenanceTool
all my Qt6 android kits are deleted. But msvc and mingw Qt6 kits are not deleted.
Upvotes: 5
Views: 1896
Reputation: 42
I met this same problem but for Windows Desktop compilation. I just add the prefix path folder, before find_package
command:
set(CMAKE_PREFIX_PATH C:\\Qt\\6.1.2\\msvc2019_64)
NOTE that it is just a half of the path to file.
If I well understand, in your situation you should add:
set(CMAKE_PREFIX_PATH C:/Qt/6.0.0/android_armv7)
After that you may recived problem with missing dll. This can by solve by adding neceserii path to your system PATH. In may situation it was:
C:\Qt\6.1.2\msvc2019_64\bin
C:\Qt\6.1.2\msvc2019_64\plugins\platforms
Upvotes: 2