Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt_android_add_apk_target.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-android-add-apk-target.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_android_add_apk_target
9
\keyword qt6_android_add_apk_target
10
11
\summary {Defines a build target that runs androiddeployqt to produce an APK.}
12
13
\include cmake-find-package-core.qdocinc
14
15
\cmakecommandsince 6.0
16
\warning This command is deprecated since Qt 6.5. Use \l qt_add_executable instead.
17
\cmakecommandandroidonly
18
19
\section1 Synopsis
20
21
\badcode
22
qt_android_add_apk_target(target)
23
\endcode
24
25
\versionlessCMakeCommandsNote qt6_android_add_apk_target()
26
27
\section1 Description
28
29
The \c{<target>_make_apk}, \c{<target>_make_aab}, and \c{<target>_make_aar}
30
custom targets created by this command take an Android deployment settings file
31
and generate APK, AAB, and AAR packages respectively by running \c{androiddeployqt}.
32
The location of the settings file is taken from the \c{target}'s
33
\c{QT_ANDROID_DEPLOYMENT_SETTINGS_FILE} property. This file is typically created by
34
\l{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}.
35
The respective Android package will be generated in an \c{android-build}
36
subdirectory below the CMake build directory of the \c{target}.
37
38
The \c{<target>_make_apk}, \c{<target>_make_aab}, and \c{<target>_make_aar}
39
targets will be automatically added as dependencies of the \c{apk}, \c{aab},
40
and \c{aar} build targets respectively, which will be created automatically.
41
Creating of the \c{apk}, \c{aab}, and \c{aar} targets can be disabled by
42
setting the \c{QT_NO_GLOBAL_APK_TARGET}, \c{QT_NO_GLOBAL_AAB_TARGET}, and
43
\c{QT_NO_GLOBAL_AAR_TARGET} variables to \c{TRUE}.
44
45
\sa {qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()},
46
{qt6_finalize_target}{qt_finalize_target()},
47
{qt6_finalize_project}{qt_finalize_project()}
48
49
\section1 Example
50
51
\snippet cmake-macros/examples.cmake qt_android_deploy_basic
52
53
The above commands define the \c{myapp_make_apk}, \c{myapp_make_aab},
54
\c{myapp_make_aar}, \c{apk}, \c{aab}, and \c{aar} build targets which can be
55
used to generate just the \c{myapp} packages or all APKs, AABs, and AARs in
56
the project respectively.
57
*/
qtbase
src
corelib
doc
src
cmake
qt_android_add_apk_target.qdoc
Generated on
for Qt by
1.16.1