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} and \c{<target>_make_aab} custom targets created by
30
this command take an Android deployment settings file and generate APK and
31
AAB 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} and \c{<target>_make_aab} targets will be
39
automatically added as dependencies of the \c{apk} and \c{aab} build targets
40
respectively, which will be created automatically. Creating of the \c{apk} and
41
\c{aab} targets can be disabled by setting the \c{QT_NO_GLOBAL_APK_TARGET} and
42
\c{QT_NO_GLOBAL_AAB_TARGET} variables to \c{TRUE}.
43
44
\sa {qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()},
45
{qt6_finalize_target}{qt_finalize_target()},
46
{qt6_finalize_project}{qt_finalize_project()}
47
48
\section1 Example
49
50
\snippet cmake-macros/examples.cmake qt_android_deploy_basic
51
52
The above commands define the \c{myapp_make_apk}, \c{myapp_make_aab}, \c{apk},
53
and \c{aab} build targets which can be used to generate just the
54
\c{myapp} packages or all APKs and AABs in the project respectively.
55
*/
qtbase
src
corelib
doc
src
cmake
qt_android_add_apk_target.qdoc
Generated on
for Qt by
1.14.0