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_LIB_DIR,
51 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
55\page cmake-variable-qt-deploy-bin-dir.html
56\ingroup cmake-variables-qtcore
58\title QT_DEPLOY_BIN_DIR
59\target cmake-variable-QT_DEPLOY_BIN_DIR
61\summary {Prefix-relative subdirectory for deploying runtime binaries on some target platforms.}
63\include cmake-deploy-var-usage.qdocinc
65\cmakevariablesince 6.3
67Projects should use \c QT_DEPLOY_BIN_DIR in their deploy scripts to avoid
68hard-coding a particular directory in which to deploy the following types of
72\li Executables on all platforms.
76\c QT_DEPLOY_BIN_DIR defaults to the value of \c${CMAKE_INSTALL_BINDIR}
77(usually \c{bin}), which is provided by CMake's \l{GNUInstallDirs} module.
78To change the value of \c QT_DEPLOY_BIN_DIR, ensure that the project sets
79\c{CMAKE_INSTALL_BINDIR} before the \c Core package is found.
81The \c QT_DEPLOY_BIN_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
83This variable is not meaningful when deploying into a macOS app bundle and
84should not be used for that scenario.
88\include cmake-deploy-runtime-dependencies.qdocinc
90\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_LIB_DIR,
91 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
95\page cmake-variable-qt-deploy-lib-dir.html
96\ingroup cmake-variables-qtcore
98\title QT_DEPLOY_LIB_DIR
99\target cmake-variable-QT_DEPLOY_LIB_DIR
101\summary {Prefix-relative subdirectory for deploying libraries on some target platforms.}
103\include cmake-deploy-var-usage.qdocinc
105\cmakevariablesince 6.3
107Projects should use \c QT_DEPLOY_LIB_DIR in their deploy scripts to avoid
108hard-coding a particular directory in which to deploy the following types of
112\li Shared libraries on platforms other than Windows.
113\li Import libraries on Windows.
116\c QT_DEPLOY_LIB_DIR defaults to the value of \c${CMAKE_INSTALL_LIBDIR}
117(usually \c{lib} or \c{lib64}), which is provided by
118CMake's \l{GNUInstallDirs} module.
119To change the value of \c QT_DEPLOY_LIB_DIR, ensure that the project sets
120\c{CMAKE_INSTALL_LIBDIR} before the \c Core package is found.
122The \c QT_DEPLOY_LIB_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
124This variable is not meaningful when deploying into a macOS app bundle and
125should not be used for that scenario.
129\include cmake-deploy-modified-variable-values.qdocinc
131\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR,
132 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
136\page cmake-variable-qt-deploy-plugins-dir.html
137\ingroup cmake-variables-qtcore
139\title QT_DEPLOY_PLUGINS_DIR
140\target cmake-variable-QT_DEPLOY_PLUGINS_DIR
142\summary {Prefix-relative subdirectory for deploying Qt plugins on some target platforms.}
144\include cmake-deploy-var-usage.qdocinc
146\cmakevariablesince 6.3
148Projects should use \c QT_DEPLOY_PLUGINS_DIR in their deploy scripts to avoid
149hard-coding a particular directory under which to deploy plugins.
151\c QT_DEPLOY_PLUGINS_DIR defaults to the value \c{plugins}. To change the value
152of \c QT_DEPLOY_PLUGINS_DIR, set it in the project deployment script
153before \c QT_DEPLOY_SUPPORT is included.
155The \c QT_DEPLOY_PLUGINS_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
157This variable is not meaningful when deploying into a macOS app bundle and
158should not be used for that scenario. Apple's macOS app bundle guidelines
159require all plugins to be deployed to the \c{PlugIns} subdirectory of the
164\include cmake-deploy-modified-variable-values.qdocinc
166\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR,
167 QT_DEPLOY_QML_DIR, QT_DEPLOY_TRANSLATIONS_DIR
171\page cmake-variable-qt-deploy-qml-dir.html
172\ingroup cmake-variables-qtcore
174\title QT_DEPLOY_QML_DIR
175\target cmake-variable-QT_DEPLOY_QML_DIR
177\summary {Prefix-relative subdirectory for deploying QML plugins on some target platforms.}
179\include cmake-deploy-var-usage.qdocinc
181\cmakevariablesince 6.3
183Projects should use \c QT_DEPLOY_QML_DIR in their deploy scripts to avoid
184hard-coding a particular directory under which to deploy QML modules.
186\c QT_DEPLOY_QML_DIR defaults to the value \c{qml}. To change the value
187of \c QT_DEPLOY_QML_DIR, set it in the project deployment script
188before \c QT_DEPLOY_SUPPORT is included.
190The \c QT_DEPLOY_QML_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
192This variable is not meaningful when deploying into a macOS app bundle and
193should not be used for that scenario. Apple's macOS app bundle guidelines
194require all plugins to be deployed to the \c{PlugIns} subdirectory of the
195bundle contents, and all other non-binary files should generally be under the
196\c{Resources} subdirectory. The different parts of a QML module therefore need
197to be deployed to different locations within the app bundle.
201\include cmake-deploy-modified-variable-values.qdocinc
203\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR,
204 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_TRANSLATIONS_DIR
208\page cmake-variable-qt-deploy-translations-dir.html
209\ingroup cmake-variables-qtcore
211\title QT_DEPLOY_TRANSLATIONS_DIR
212\target cmake-variable-QT_DEPLOY_TRANSLATIONS_DIR
214\summary {Prefix-relative subdirectory for deploying Qt translations on some target platforms.}
216\include cmake-deploy-var-usage.qdocinc
218\cmakevariablesince 6.5
220Projects should use \c QT_DEPLOY_TRANSLATIONS_DIR in their deploy scripts to
221avoid hard-coding a particular directory under which to deploy translations.
223\c QT_DEPLOY_TRANSLATIONS_DIR defaults to the value \c{translations}. To change
224the value of \c QT_DEPLOY_TRANSLATIONS_DIR, set it in the project deployment
225script before \c QT_DEPLOY_SUPPORT is included.
227The \c QT_DEPLOY_TRANSLATIONS_DIR path is relative to \l{QT_DEPLOY_PREFIX}.
229This variable is not meaningful when deploying on macOS or Windows.
233\include cmake-deploy-modified-variable-values.qdocinc
235\sa QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR,
236 QT_DEPLOY_PLUGINS_DIR, QT_DEPLOY_QML_DIR
240\page cmake-variable-qt-deploy-ignored-lib-dirs.html
241\ingroup cmake-variables-qtcore
243\title QT_DEPLOY_IGNORED_LIB_DIRS
244\target cmake-variable-QT_DEPLOY_IGNORED_LIB_DIRS
246\summary {Directories that are excluded from runtime dependencies search}
248\include cmake-deploy-var-usage.qdocinc
250\cmakevariablesince 6.5
252This variable contains a list of directories that are not taken into account
253when searching for runtime dependencies with \l{qt_deploy_runtime_dependencies}.
255Projects may alter this variable before calling
256\l{qt_deploy_runtime_dependencies} to control from which directory runtime
257dependencies are deployed.
259This variable is ignored if the \c{POST_EXCLUDE_REGEXES} option is specified in
260the \l{qt_deploy_runtime_dependencies} call.
262This variable is not meaningful when deploying on macOS or Windows.
264\sa qt_deploy_runtime_dependencies