1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
4/* NOTE: The variables documented here are available when running a deploy
5** script, they are not available at configure time (i.e. when running
6** CMake). Both these and the set of configure-time variables are all
7** members of the cmake-variables-qtcore group.
11\page cmake-variable-qt-deploy-prefix.html
12\ingroup cmake-variables-qtcore
14\title QT_DEPLOY_PREFIX
15\target cmake-variable-QT_DEPLOY_PREFIX
17\summary {Base location for a deployment.}
19\include cmake-deploy-var-usage.qdocinc
21\cmakevariablesince 6.3
23\c{QT_DEPLOY_PREFIX} provides the base deployment directory. The other
24\c{QT_DEPLOY_..._DIR} variables should be treated as relative to this location.
25The value of \c{QT_DEPLOY_PREFIX} may be relative or absolute, so projects
26should not assume one or the other in any given situation. A relative path is
27expected to be treated as relative to the current working directory, as seen
28by the build tool (ninja, make, and so on) at install time.
30The default value is \c{$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}}, which is the
31base location CMake uses during installation. If that evaluates to an empty
32string, the default value will be a dot (.) instead, which is generally the
33appropriate value when deploying as part of a post-build rule. This two-step
34fallback logic ensures that projects can assume \c{QT_DEPLOY_PREFIX} will not
35be an empty string, so it can safely be used as part of a path like
36\c{${QT_DEPLOY_PREFIX}/${QT_DEPLOY_BIN_DIR}}.
38To change the value of \c QT_DEPLOY_PREFIX, the project can be configured
39with a custom \l CMAKE_INSTALL_PREFIX as described in
40\l {Command Line cmake invocation}.
42The \l DESTDIR environment variable can also be used to modify the final
43installation, and thus deployment, location.
45Projects should rarely need to use this variable. In typical scenarios, deploy
46scripts should assume that the working directory is already set to the base
47install location and just use the prefix-relative \c{QT_DEPLOY_..._DIR}
50\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIBEXEC_DIR,
51 QT_DEPLOY_LIB_DIR, QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR,
52 QT_DEPLOY_TRANSLATIONS_DIR
56\page cmake-variable-qt-deploy-bin-dir.html
57\ingroup cmake-variables-qtcore
59\title QT_DEPLOY_BIN_DIR
60\target cmake-variable-QT_DEPLOY_BIN_DIR
62\summary {Prefix-relative subdirectory for deploying runtime binaries on some target platforms.}
64\include cmake-deploy-var-usage.qdocinc
66\cmakevariablesince 6.3
68Projects should use \c QT_DEPLOY_BIN_DIR in their deploy scripts to avoid
69hard-coding a particular directory in which to deploy the following types of
73\li Executables on all platforms.
77\c QT_DEPLOY_BIN_DIR defaults to the value of \c${CMAKE_INSTALL_BINDIR}
78(usually \c{bin}), which is provided by CMake's \l{GNUInstallDirs} module.
79To change the value of \c QT_DEPLOY_BIN_DIR, ensure that the project sets
80\c{CMAKE_INSTALL_BINDIR} before the \c Core package is found.
82The \c QT_DEPLOY_BIN_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
84This variable is not meaningful when deploying into a macOS app bundle and
85should not be used for that scenario.
89\include cmake-deploy-runtime-dependencies.qdocinc
91\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_LIBEXEC_DIR,
92 QT_DEPLOY_LIB_DIR, QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR,
93 QT_DEPLOY_TRANSLATIONS_DIR
97\page cmake-variable-qt-deploy-libexec-dir.html
98\ingroup cmake-variables-qtcore
100\title QT_DEPLOY_LIBEXEC_DIR
101\target cmake-variable-QT_DEPLOY_LIBEXEC_DIR
103\summary {Prefix-relative subdirectory for deploying program executables on some target platforms.}
105\include cmake-deploy-var-usage.qdocinc
107\cmakevariablesince 6.7
109On Unix derivatives, projects should use \c QT_DEPLOY_LIBEXEC_DIR in their
110deploy scripts to avoid hard-coding a particular directory in which to deploy
111helper executables that are local to the project.
113For example, projects using QtWebEngine would deploy the \c QtWebEngineProcess
114executable to this directory.
116\c QT_DEPLOY_LIBEXEC_DIR defaults to the value of \c${CMAKE_INSTALL_LIBEXECDIR}
117(usually \c{libexec}), which is provided by CMake's \l{GNUInstallDirs} module.
118To change the value of \c QT_DEPLOY_LIBEXEC_DIR, ensure that the project sets
119\c{CMAKE_INSTALL_LIBEXECDIR} before the \c Core package is found.
121The \c QT_DEPLOY_LIBEXEC_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
123This variable is not meaningful when deploying into a macOS app bundle and
124should not be used for that scenario.
128\include cmake-deploy-modified-variable-values.qdocinc
130\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR,
131 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
135\page cmake-variable-qt-deploy-lib-dir.html
136\ingroup cmake-variables-qtcore
138\title QT_DEPLOY_LIB_DIR
139\target cmake-variable-QT_DEPLOY_LIB_DIR
141\summary {Prefix-relative subdirectory for deploying libraries on some target platforms.}
143\include cmake-deploy-var-usage.qdocinc
145\cmakevariablesince 6.3
147Projects should use \c QT_DEPLOY_LIB_DIR in their deploy scripts to avoid
148hard-coding a particular directory in which to deploy the following types of
152\li Shared libraries on platforms other than Windows.
153\li Import libraries on Windows.
156\c QT_DEPLOY_LIB_DIR defaults to the value of \c${CMAKE_INSTALL_LIBDIR}
157(usually \c{lib} or \c{lib64}), which is provided by
158CMake's \l{GNUInstallDirs} module.
159To change the value of \c QT_DEPLOY_LIB_DIR, ensure that the project sets
160\c{CMAKE_INSTALL_LIBDIR} before the \c Core package is found.
162The \c QT_DEPLOY_LIB_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
164This variable is not meaningful when deploying into a macOS app bundle and
165should not be used for that scenario.
169\include cmake-deploy-modified-variable-values.qdocinc
171\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR,
172 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
176\page cmake-variable-qt-deploy-plugins-dir.html
177\ingroup cmake-variables-qtcore
179\title QT_DEPLOY_PLUGINS_DIR
180\target cmake-variable-QT_DEPLOY_PLUGINS_DIR
182\summary {Prefix-relative subdirectory for deploying Qt plugins on some target platforms.}
184\include cmake-deploy-var-usage.qdocinc
186\cmakevariablesince 6.3
188Projects should use \c QT_DEPLOY_PLUGINS_DIR in their deploy scripts to avoid
189hard-coding a particular directory under which to deploy plugins.
191\c QT_DEPLOY_PLUGINS_DIR defaults to the value \c{plugins}. To change the value
192of \c QT_DEPLOY_PLUGINS_DIR, set it in the project deployment script
193before \c QT_DEPLOY_SUPPORT is included.
195The \c QT_DEPLOY_PLUGINS_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
197This variable is not meaningful when deploying into a macOS app bundle and
198should not be used for that scenario. Apple's macOS app bundle guidelines
199require all plugins to be deployed to the \c{PlugIns} subdirectory of the
204\include cmake-deploy-modified-variable-values.qdocinc
206\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR,
207 QT_DEPLOY_LIBEXEC_DIR, QT_DEPLOY_LIB_DIR, QT_DEPLOY_QML_DIR,
208 QT_DEPLOY_TRANSLATIONS_DIR
212\page cmake-variable-qt-deploy-qml-dir.html
213\ingroup cmake-variables-qtcore
215\title QT_DEPLOY_QML_DIR
216\target cmake-variable-QT_DEPLOY_QML_DIR
218\summary {Prefix-relative subdirectory for deploying QML plugins on some target platforms.}
220\include cmake-deploy-var-usage.qdocinc
222\cmakevariablesince 6.3
224Projects should use \c QT_DEPLOY_QML_DIR in their deploy scripts to avoid
225hard-coding a particular directory under which to deploy QML modules.
227\c QT_DEPLOY_QML_DIR defaults to the value \c{qml}. To change the value
228of \c QT_DEPLOY_QML_DIR, set it in the project deployment script
229before \c QT_DEPLOY_SUPPORT is included.
231The \c QT_DEPLOY_QML_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
233This variable is not meaningful when deploying into a macOS app bundle and
234should not be used for that scenario. Apple's macOS app bundle guidelines
235require all plugins to be deployed to the \c{PlugIns} subdirectory of the
236bundle contents, and all other non-binary files should generally be under the
237\c{Resources} subdirectory. The different parts of a QML module therefore need
238to be deployed to different locations within the app bundle.
242\include cmake-deploy-modified-variable-values.qdocinc
244\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR,
245 QT_DEPLOY_LIBEXEC_DIR, QT_DEPLOY_LIB_DIR, QT_DEPLOY_PLUGINS_DIR,
246 QT_DEPLOY_TRANSLATIONS_DIR
250\page cmake-variable-qt-deploy-translations-dir.html
251\ingroup cmake-variables-qtcore
253\title QT_DEPLOY_TRANSLATIONS_DIR
254\target cmake-variable-QT_DEPLOY_TRANSLATIONS_DIR
256\summary {Prefix-relative subdirectory for deploying Qt translations on some target platforms.}
258\include cmake-deploy-var-usage.qdocinc
260\cmakevariablesince 6.5
262Projects should use \c QT_DEPLOY_TRANSLATIONS_DIR in their deploy scripts to
263avoid hard-coding a particular directory under which to deploy translations.
265\c QT_DEPLOY_TRANSLATIONS_DIR defaults to the value \c{translations}. To change
266the value of \c QT_DEPLOY_TRANSLATIONS_DIR, set it in the project deployment
267script before \c QT_DEPLOY_SUPPORT is included.
269The \c QT_DEPLOY_TRANSLATIONS_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
271This variable is not meaningful when deploying on macOS or Windows.
275\include cmake-deploy-modified-variable-values.qdocinc
277\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR,
278 QT_DEPLOY_LIBEXEC_DIR, QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR
282\page cmake-variable-qt-deploy-ignored-lib-dirs.html
283\ingroup cmake-variables-qtcore
285\title QT_DEPLOY_IGNORED_LIB_DIRS
286\target cmake-variable-QT_DEPLOY_IGNORED_LIB_DIRS
288\summary {Directories that are excluded from runtime dependencies search}
290\include cmake-deploy-var-usage.qdocinc
292\cmakevariablesince 6.5
294This variable contains a list of directories that are not taken into account
295when searching for runtime dependencies with \l{qt_deploy_runtime_dependencies}.
297Projects may alter this variable before calling
298\l{qt_deploy_runtime_dependencies} to control from which directory runtime
299dependencies are deployed.
301This variable is ignored if the \c{POST_EXCLUDE_REGEXES} option is specified in
302the \l{qt_deploy_runtime_dependencies} call.
304This variable is not meaningful when deploying on macOS or Windows.
306\sa qt_deploy_runtime_dependencies