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_generate_deploy_script.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-generate-deploy-script.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_generate_deploy_script
9
\keyword qt6_generate_deploy_script
10
11
\summary {Generate a custom deployment script.}
12
13
\include cmake-find-package-core.qdocinc
14
15
\cmakecommandsince 6.5
16
17
\section1 Synopsis
18
19
\badcode
20
qt_generate_deploy_script(
21
OUTPUT_SCRIPT <var>
22
[TARGET target]
23
[NAME script_name]
24
[CONTENT content]
25
)
26
\endcode
27
28
\versionlessCMakeCommandsNote qt6_generate_deploy_script()
29
30
\section1 Description
31
32
The command generates a script whose full file path will be stored in the
33
variable named by the \c{OUTPUT_SCRIPT} option. That script is only written
34
at CMake generation time. It is intended to be used with the \l{install(SCRIPT)}
35
command, which should come after the application's target has been installed
36
using \l{install(TARGETS)}.
37
38
The command takes care of generating a file named suitably for multi-config
39
generators. Necessary includes are added such that Qt's CMake deployment
40
functions and variables are accessible.
41
42
The \c TARGET argument specifies the target that will be deployed by the script.
43
This affects the file name of the generated script, unless \c NAME is specified.
44
45
The \c NAME argument controls an identifiable portion within the deployment
46
script's automatically generated name. The \c NAME argument defaults to \c
47
custom if neither \c NAME nor \c TARGET are given.
48
49
The \c CONTENT argument specifies the code that is written to the deployment
50
script. The content may contain generator expressions.
51
52
This command is intended for generating custom deployment scripts that
53
directly call functions of Qt's deployment API. For less complex
54
deployment purposes, it is more convenient to use
55
\l{qt6_generate_deploy_app_script}{qt_generate_deploy_app_script()} or
56
\l{qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()}.
57
58
\sa {qt6_generate_deploy_app_script}{qt_generate_deploy_app_script()},
59
{qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()}
60
61
\section1 Example
62
63
\snippet cmake-macros/deployment.cmake qt_generate_deploy_script_example
64
65
*/
qtbase
src
corelib
doc
src
cmake
qt_generate_deploy_script.qdoc
Generated on
for Qt by
1.14.0