summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/cmake/cmake-configure-variables.qdoc
blob: 9653800bc808742f8f246f624525787de3293d5e (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/* NOTE: The variables documented here are available when running CMake, they
**       are not available in a deployment script. Both these and the set of
**       deploy-time variables are all members of the cmake-variables-qtcore
**       group.
**/

/*!
\group cmake-variables-qtcore
\title CMake Variables in Qt6 Core

The following CMake variables are defined when Qt6::Core is loaded, for instance
with

\badcode
find_package(Qt6 REQUIRED COMPONENTS Core)
\endcode

\sa{CMake Variable Reference}
*/

*/*!
\page cmake-variable-android-ndk-host-system-name.html
\ingroup cmake-variables-qtcore

\title ANDROID_NDK_HOST_SYSTEM_NAME
\target cmake-variable-ANDROID_NDK_HOST_SYSTEM_NAME

\summary {Android-specific architecture of the host system.}

\cmakevariablesince 6.0
\preliminarycmakevariable
\cmakevariableandroidonly

This is normally set by the Android NDK toolchain file. It is written out as
part of the deployment settings for a target.

\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}
*/

/*!
\page cmake-variable-android-sdk-root.html
\ingroup cmake-variables-qtcore

\title ANDROID_SDK_ROOT
\target cmake-variable-ANDROID_SDK_ROOT

\summary {Location of the Android SDK.}

\cmakevariablesince 6.0
\preliminarycmakevariable
\cmakevariableandroidonly

This specifies the location of the Android SDK when building for the Android platform.
It is written out as part of the deployment settings for a target.

\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}.
*/

/*!
\page cmake-variable-qt-android-application-arguments.html
\ingroup cmake-variables-qtcore

\title QT_ANDROID_APPLICATION_ARGUMENTS
\target cmake-variable-QT_ANDROID_APPLICATION_ARGUMENTS

\summary {List of arguments to pass to Android applications.}

\cmakevariablesince 6.0
\preliminarycmakevariable
\cmakevariableandroidonly

This contains a list of arguments to be passed to Android applications. It is written
out as part of the deployment settings for a target.

\sa{qt6_android_generate_deployment_settings}{qt_android_generate_deployment_settings()}
*/

/*!
\page cmake-variable-qt-android-build-all-abis.html
\ingroup cmake-variables-qtcore

\title QT_ANDROID_BUILD_ALL_ABIS
\target cmake-variable-QT_ANDROID_BUILD_ALL_ABIS

\summary {Enables building multi-ABI packages using the autodetected Qt for Android SDK list.}

\cmakevariablesince 6.3
\preliminarycmakevariable
\cmakevariableandroidonly

The option automatically detects available ABIs of Qt for Android and uses them to
build a package. The automatic detection expects the default directory structure
supplied by the Qt installer, with the corresponding naming of the directories.
\include cmake-android-supported-abis.qdocinc
The typical directory structure looks as below:
\badcode
/path/to/Qt/6.x.x
    android_armv7
    android_arm64_v8a
    android_x86
    android_x86_64
    ...
\endcode
The auto-detected paths can be customized using one of \c{QT_PATH_ANDROID_ABI_<ABI>} variables.

The variable is set to FALSE by default.

\sa{QT_PATH_ANDROID_ABI_<ABI>}
*/

/*!
\page cmake-variable-qt-android-abis.html
\ingroup cmake-variables-qtcore

\title QT_ANDROID_ABIS
\target cmake-variable-QT_ANDROID_ABIS

\summary {List of ABIs that the project packages are built for.}

\cmakevariablesince 6.3
\preliminarycmakevariable
\cmakevariableandroidonly

This variable specifies a list of ABIs to be used to build the project packages.
\include cmake-android-supported-abis.qdocinc
Each ABI should have the corresponding Qt for Android either installed or
user-built. It's possible to specify the path to the Qt for Android ABI using
the corresponding \c{QT_PATH_ANDROID_ABI_<ABI>} variable.

\note \c{QT_ANDROID_BUILD_ALL_ABIS} has the higher priority and ignores the
QT_ANDROID_ABIS logic.

\sa{QT_PATH_ANDROID_ABI_<ABI>}, {QT_ANDROID_BUILD_ALL_ABIS}
*/

/*!
\page cmake-variable-qt-path-android-abi.html
\ingroup cmake-variables-qtcore

\title QT_PATH_ANDROID_ABI_<ABI>
\target cmake-variable-QT_PATH_ANDROID_ABI_<ABI>

\summary {Set of variables to specify the path to Qt for Android for the corresponding ABI.}

\cmakevariablesince 6.3
\preliminarycmakevariable
\cmakevariableandroidonly

Each variable can be used to specify the path to Qt for Android for the corresponding ABI.
\include cmake-android-supported-abis.qdocinc

\sa{cmake-variable-QT_ANDROID_ABIS}{QT_ANDROID_ABIS}
*/

/*!
\page cmake-variable-qt-android-sign-aab.html
\ingroup cmake-variables-qtcore

\title QT_ANDROID_SIGN_AAB
\target cmake-variable-QT_ANDROID_SIGN_AAB

\summary {Sign the .aab package with the specified keystore, alias and store password.}
\cmakevariablesince 6.4
\preliminarycmakevariable
\cmakevariableandroidonly

Sign the resulting package. The path of the keystore file, the alias of the key and passwords
have to be specified by additional environment variables:
\badcode
    QT_ANDROID_KEYSTORE_PATH
    QT_ANDROID_KEYSTORE_ALIAS
    QT_ANDROID_KEYSTORE_STORE_PASS
    QT_ANDROID_KEYSTORE_KEY_PASS
\endcode
Mentioned variables are used internally by \l{androiddeployqt}.

\sa{androiddeployqt}
*/

/*!
\page cmake-variable-qt-android-sign-apk.html
\ingroup cmake-variables-qtcore

\title QT_ANDROID_SIGN_APK
\target cmake-variable-QT_ANDROID_SIGN_APK

\summary {Sign the package with the specified keystore, alias and store password.}
\cmakevariablesince 6.4
\preliminarycmakevariable
\cmakevariableandroidonly

Sign the resulting package. The path of the keystore file, the alias of the key and passwords
have to be specified by additional environment variables:
\badcode
    QT_ANDROID_KEYSTORE_PATH
    QT_ANDROID_KEYSTORE_ALIAS
    QT_ANDROID_KEYSTORE_STORE_PASS
    QT_ANDROID_KEYSTORE_KEY_PASS
\endcode
Mentioned variables are used internally by \l{androiddeployqt}.

\sa{androiddeployqt}
*/

/*!
\page cmake-variable-qt-no-collect-build-tree-apk-deps.html
\ingroup cmake-variables-qtcore

\title QT_NO_COLLECT_BUILD_TREE_APK_DEPS
\target cmake-variable-QT_NO_COLLECT_BUILD_TREE_APK_DEPS

\summary {Prevents collecting of project-built shared library targets during Android deployment.}

\cmakevariablesince 6.3
\preliminarycmakevariable
\cmakevariableandroidonly

During project finalization, the build system collects the locations of
all built shared library targets in the project.
These locations are passed to \l androiddeployqt for deployment consideration when
resolving dependencies between libraries.
Set \c QT_NO_COLLECT_BUILD_TREE_APK_DEPS to \c TRUE to disable this behavior.

\sa {qt6_finalize_project}{qt_finalize_project()}
\sa {cmake-variable-QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS}{QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS}
*/

/*!
\page cmake-variable-qt-no-collect-imported-target-apk-deps.html
\ingroup cmake-variables-qtcore

\title QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS
\target cmake-variable-QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS

\summary {Prevents collecting of imported targets during Android deployment.}

\cmakevariablesince 6.5
\preliminarycmakevariable
\cmakevariableandroidonly

When using CMake version 3.21 or later, the build system collects the locations of
imported shared library targets that might be relevant for deployment.
The collected targets are those that are reachable from the the directory scope
of the currently processed executable target. That includes the target's source directory
scope and its parents.
The collected locations are passed to \l androiddeployqt for deployment consideration when
resolving dependencies between libraries.
Set \c QT_NO_COLLECT_IMPORTED_TARGET_APK_DEPS to \c TRUE to disable this behavior.

\sa {qt6_finalize_project}{qt_finalize_project()}
\sa {cmake-variable-QT_NO_COLLECT_BUILD_TREE_APK_DEPS}{QT_NO_COLLECT_BUILD_TREE_APK_DEPS}
*/

/*!
\page cmake-variable-qt-host-path.html
\ingroup cmake-variables-qtcore

\title QT_HOST_PATH
\target cmake-variable-QT_HOST_PATH

\summary {Location of the host Qt installation when cross-compiling.}

\cmakevariablesince 6.0

When cross-compiling, this must be set to the install location of Qt for the host
platform. It is used to locate tools to be run on the host (\l{moc}, \l{rcc},
\l{androiddeployqt}, and so on).
*/

/*!
\page cmake-variable-qt-no-set-xcode-development-team-id.html
\ingroup cmake-variables-qtcore

\title QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID
\target cmake-variable-QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID

\summary {Disables providing a fallback team ID during target finalization on iOS.}

\cmakevariablesince 6.1

When finalizing an executable target on iOS,
\l{qt6_finalize_target}{qt_finalize_target()} will populate the target's
\c XCODE_ATTRIBUTE_DEVELOPMENT_TEAM property if it hasn't been set.
Set \c QT_NO_SET_XCODE_DEVELOPMENT_TEAM_ID to true if you want to prevent this.
*/

/*!
\page cmake-variable-qt-no-set-xcode-bundle-identifier.html
\ingroup cmake-variables-qtcore

\title QT_NO_SET_XCODE_BUNDLE_IDENTIFIER
\target cmake-variable-QT_NO_SET_XCODE_BUNDLE_IDENTIFIER

\summary {Disables providing a fallback app bundle ID during target finalization on iOS.}

\cmakevariablesince 6.1

When finalizing an executable target on iOS,
\l{qt6_finalize_target}{qt_finalize_target()} will populate the target's
\c XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER and
\c MACOSX_BUNDLE_GUI_IDENTIFIER properties if they haven't been set.
Set \c QT_NO_SET_XCODE_BUNDLE_IDENTIFIER to true if you want to prevent this.
*/

/*!
\page cmake-variable-qt-enable-verbose-deployment.html
\ingroup cmake-variables-qtcore

\title QT_ENABLE_VERBOSE_DEPLOYMENT
\target cmake-variable-QT_ENABLE_VERBOSE_DEPLOYMENT

\summary {Enables verbose mode of deployment tools}

\cmakevariablesince 6.3
\preliminarycmakevariable

Enables verbose mode of the \l androiddeployqt deployment tool when it is called
internally at build time, usually during target finalization.

This variable also changes the default verbosity of install-time deployment
scripts for other platforms (see \l{qt_deploy_runtime_dependencies()}), but it
must be set before the first \c{find_package(Qt6)} call to have that effect.
*/

/*!
\page cmake-variable-qt-deploy-support.html
\ingroup cmake-variables-qtcore

\title QT_DEPLOY_SUPPORT
\target cmake-variable-QT_DEPLOY_SUPPORT

\summary {Name of the file to include for setting up deployment support.}

\cmakevariablesince 6.3
\preliminarycmakevariable
\note The value of this variable should never be modified by project code.

This configure-phase variable is set by the Core package. It is intended to be
used as the first line of any deployment script to ensure access to the
deployment APIs provided by Qt. Such deployment scripts do not run during
CMake's configure phase, they are executed during installation or as
part of a post-build rule.

The following example shows one way the variable would be used when installing
an application, along with its runtime dependencies:

\include cmake-deploy-runtime-dependencies.qdocinc

\sa qt_deploy_runtime_dependencies(), qt_deploy_qml_imports()
*/

/*!
\page cmake-variable-qt-no-standard-project-setup.html
\ingroup cmake-variables-qtcore

\title QT_NO_STANDARD_PROJECT_SETUP
\target cmake-variable-QT_NO_STANDARD_PROJECT_SETUP

\summary {Prevents subsequent calls to qt_standard_project_setup() from making any changes.}

\cmakevariablesince 6.3

The \l{qt6_standard_project_setup}{qt_standard_project_setup()} command is
typically called in the top level \c{CMakeLists.txt} file of a project. In some
scenarios, such projects may be absorbed as a child project of a larger project
hierarchy. A parent project may want to prevent any child project from applying
changes to the setup. The parent project can achieve this by setting
\c{QT_NO_STANDARD_PROJECT_SETUP} to true before bringing in the child project
via \l{add_subdirectory()}, \l{FetchContent_MakeAvailable()} or other similar
methods provided by CMake.

\sa {qt6_standard_project_setup}{qt_standard_project_setup()}
*/

/*!
\page cmake-variable-qt-ios-launch-screen.html
\ingroup cmake-variables-qtcore

\title QT_IOS_LAUNCH_SCREEN
\target cmake-variable-QT_IOS_LAUNCH_SCREEN

\summary {Path to iOS launch screen storyboard used by all targets}

\cmakevariablesince 6.4
\preliminarycmakevariable
\cmakevariableiosonly

Specifies the path to an iOS launch screen storyboard file that will be used
by all targets within a project.

\sa {Launch Screens and Launch Images}
*/