Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qt_finalize_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-finalize-target.html
6\ingroup cmake-commands-qtcore
7
8\title qt_finalize_target
9\keyword qt6_finalize_target
10
11\summary {Handles various common platform-specific tasks associated with Qt targets.}
12
13\include cmake-find-package-core.qdocinc
14
15\cmakecommandsince 6.2
16
17\section1 Synopsis
18
19\badcode
20qt_finalize_target(target)
21\endcode
22
23\versionlessCMakeCommandsNote qt6_finalize_target()
24
25\section1 Description
26
27After a target is created, further processing or \e{finalization} steps are
28sometimes needed. The steps to perform depend on the platform, the type of
29target, and on various properties of the target. These steps are expected to be
30performed within the same directory scope as the one in which the \c{target}
31was created, so this command should also be called from that same directory
32scope.
33
34This command is ordinarily invoked as part of a call to
35\l{qt6_add_executable}{qt_add_executable()},
36\l{qt6_add_library}{qt_add_library()}, or \l{qt6_add_plugin}{qt_add_plugin()}.
37The timing of when that call takes place and when a project might need to call
38it explicitly, is discussed in the documentation of those commands.
39
40\sa {qt6_set_finalizer_mode}{qt_set_finalizer_mode()}
41
42\section1 Executable Targets
43
44For executable targets, \c{qt_finalize_target()} implements the logic described
45in the subsections below, as appropriate for the platform and target provided.
46Later Qt releases may expand finalization processing further.
47
48\section2 All Platforms
49
50Some internal processing is performed to facilitate automatic linking of Qt
51plugins. This is especially important if using a statically built Qt or a
52CMake version earlier than 3.21.
53
54\section2 Android
55
56\list
57\li Generate a deployment settings file for the \c target.
58\li Create a build target for generating an APK.
59\endlist
60
61\section2 WASM
62
63Create \c{${target}.html} (a target-specific \c{wasm_shell.html} file),
64\c{qtloader.js}, and \c{qtlogo.svg} files in the \c{CMAKE_CURRENT_BINARY_DIR}.
65
66\section2 iOS
67
68Finalization attempts to provide sensible values for the following target
69properties if they are not already set, and their corresponding \c{CMAKE_...}
70variable is also not set:
71
72\list
73\li \c XCODE_ATTRIBUTE_DEVELOPMENT_TEAM
74\li \c XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER
75\li \c MACOSX_BUNDLE_GUI_IDENTIFIER
76\endlist
77
78If required, the \l QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID variable can be used to
79disable setting \c XCODE_ATTRIBUTE_DEVELOPMENT_TEAM, and the
80\l QT_NO_SET_XCODE_BUNDLE_IDENTIFIER variable can be used to disable setting
81\c XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER and \c MACOSX_BUNDLE_GUI_IDENTIFIER.
82
83\section1 Library Targets
84
85As of this Qt version, finalization for library targets does not perform any
86processing. Future Qt versions may add finalization processing for libraries,
87so you should ensure finalization is still invoked in the expected way.
88
89*/