summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/cmake/qt_finalize_target.qdoc
blob: 2665c3dc0c07df8b018d94b356087fa5a3ed8cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page qt_finalize_target.html
\ingroup cmake-commands-qtcore

\title qt_finalize_target
\target qt6_finalize_target

\summary {Handles various common platform-specific tasks associated with Qt targets.}

\include cmake-find-package-core.qdocinc

\cmakecommandsince 6.2

\section1 Synopsis

\badcode
qt_finalize_target(target)
\endcode

\versionlessCMakeCommandsNote qt6_finalize_target()

\section1 Description

After a target is created, further processing or \e{finalization} steps are
sometimes needed. The steps to perform depend on the platform, the type of
target, and on various properties of the target. These steps are expected to be
performed within the same directory scope as the one in which the \c{target}
was created, so this command should also be called from that same directory
scope.

This command is ordinarily invoked as part of a call to
\l{qt6_add_executable}{qt_add_executable()} or
\l{qt6_add_library}{qt_add_library()}. The timing of when that call takes
place and when it might need to be called explicitly by a project is discussed
in the documentation of those commands.

\sa {qt6_set_finalizer_mode}{qt_set_finalizer_mode()}

\section1 Executable Targets

For executable targets, \c{qt_finalize_target()} implements the logic described
in the subsections below, as appropriate for the platform and target provided.
Later Qt releases may expand finalization processing further.

\section2 All Platforms

Some internal processing is performed to facilitate automatic linking of Qt
plugins. This is especially important if using a statically built Qt or a
CMake version earlier than 3.21.

\section2 Android

\list
\li Generate a deployment settings file for the \c target.
\li Create a build target for generating an APK.
\endlist

\section2 WASM

Create \c{${target}.html} (a target-specific \c{wasm_shell.html} file),
\c{qtloader.js} and \c{qtlogo.svg} files in the \c{CMAKE_CURRENT_BINARY_DIR}.

\section2 iOS

Finalization attempts to provide sensible values for the following target
properties if they are not already set, and their corresponding \c{CMAKE_...}
variable is also not set:

\list
\li \c XCODE_ATTRIBUTE_DEVELOPMENT_TEAM
\li \c XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
\li \c MACOSX_BUNDLE_GUI_IDENTIFIER
\endlist

If required, the \l QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID variable can be used to
disable setting \c XCODE_ATTRIBUTE_DEVELOPMENT_TEAM, and the
\l QT_NO_SET_XCODE_BUNDLE_IDENTIFIER variable can be used to disable setting
\c XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER and \c MACOSX_BUNDLE_GUI_IDENTIFIER.

\section1 Library Targets

As of this Qt version, finalization for library targets does not perform any
processing. Future Qt versions may add finalization processing for libraries,
so you should ensure finalization is still invoked in the expected way.

*/