diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-08-14 17:53:37 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-08-14 21:40:28 +0200 |
commit | 32121e9882bc69ad72d8e08ee7c21a684db921c1 (patch) | |
tree | 41b44db9fc6bde33f2cf1a707ae3231cb89a970a /CMakeLists.txt | |
parent | c1038019fcab3f244929d599d5201e8244131ba2 (diff) | |
download | qtbase-32121e9882bc69ad72d8e08ee7c21a684db921c1.tar.gz |
CMake: Split out some Android functions into a public API file
To fix CMake Qt For Android projects to configure, we need to move
some functions from a private CMake API file only, to a public one.
Add Qt6AndroidMacros.cmake which will be loaded by Qt6Core package.
We'll have to decide how we proceed with Qt5AndroidSupport.cmake,
because that file automatically runs code when included in Qt5, and we
usually don't want to do it.
We'll also have to decide how to handle the define_property() calls
that are still left in the private QtPlatformAndroid.cmake file.
With this fix, Qt example CMake projects that use
add_qt_gui_executable should now be buildable. An APK can be created
with 'ninja apk'.
Unfortunately Qt Creator 4.13 does not currently seem to support
opening and building CMake Qt For Android projects properly.
While the build succeeds after fiddling with the Kit settings, the APK
deploy step fails to run (at least on my machine).
So the simplest way to run the built APK is to open the android-build
dir with Android Studio and launch the example application from there.
Task-number: QTBUG-85399
Change-Id: I77f246331de7a6e9e6d4ba7d973730190138f136
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fc08130795..10df970dff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,9 @@ if(NOT QT_BUILD_STANDALONE_TESTS) #include CoreMacros() for qt6_generate_meta_types() include(src/corelib/Qt6CoreMacros.cmake) + # Needed when building qtbase for android. + include(src/corelib/Qt6AndroidMacros.cmake) + ## Setup documentation add_subdirectory(doc) |