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_deploy_qt_conf.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-deploy-qt-conf.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_deploy_qt_conf
9
\keyword qt6_deploy_qt_conf
10
11
\summary {Write a qt.conf file at deployment time.}
12
13
\include cmake-find-package-core.qdocinc
14
15
Unlike most other CMake commands provided by Qt, \c{qt_deploy_qt_conf()} can
16
only be called from a deployment script. It cannot be called directly by the
17
project.
18
19
\cmakecommandsince 6.3
20
\note This command does not usually need to be called directly. It is used
21
internally by other higher level commands, but projects wishing to
22
implement more customized deployment logic may find it useful.
23
24
\section1 Synopsis
25
26
\badcode
27
qt_deploy_qt_conf(file_path
28
[PREFIX prefix]
29
[DOC_DIR doc_dir]
30
[HEADERS_DIR headers_dir]
31
[LIB_DIR lib_dir]
32
[LIBEXEC_DIR libexec_dir]
33
[BIN_DIR bin_dir]
34
[PLUGINS_DIR plugins_dir]
35
[QML_DIR qml_dir]
36
[ARCHDATA_DIR archdata_dir]
37
[DATA_DIR data_dir]
38
[TRANSLATIONS_DIR translations_dir]
39
[EXAMPLES_DIR examples_dir]
40
[TESTS_DIR test_dir]
41
[SETTINGS_DIR settings_dir]
42
)
43
\endcode
44
45
\section1 Description
46
47
Use this command when you need to generate a \l{Using qt.conf}{qt.conf} file
48
during deployment. The default value of any path supported by \c{qt.conf} can
49
be overridden with the corresponding \c{..._DIR} option. The command will only
50
write a path to the generated \c{qt.conf} file if it differs from the default
51
value.
52
The default values can be found at \l{Overriding Paths}.
53
54
The \c file_path argument expects an absolute path to the location where the
55
\c qt.conf file should be written to. The \l{QT_DEPLOY_PREFIX} and \l{QT_DEPLOY_BIN_DIR}
56
variables can be used to dynamically specify a path relative to the deployment binary directory,
57
as shown in the example below. This helps avoid hard-coding an absolute path.
58
59
\sa {qt6_generate_deploy_app_script}{qt_generate_deploy_app_script()},
60
{qt6_deploy_runtime_dependencies}{qt_deploy_runtime_dependencies()}
61
62
\section1 Example
63
64
\badcode
65
# The following script must only be executed at install time
66
qt_generate_deploy_script(
67
OUTPUT_SCRIPT deploy_script
68
CONTENT "
69
qt_deploy_qt_conf(\"\${QT_DEPLOY_PREFIX}/\${QT_DEPLOY_BIN_DIR}/qt.conf\"
70
DATA_DIR \"./custom_data_dir\"
71
TRANSLATIONS_DIR \"./custom_translations_dir\"
72
)
73
")
74
75
install(SCRIPT ${deploy_script})
76
\endcode
77
78
*/
qtbase
src
corelib
doc
src
cmake
qt_deploy_qt_conf.qdoc
Generated on
for Qt by
1.14.0