Base location for a deployment.

This variable is defined by the script named by QT_DEPLOY_SUPPORT. It should only be used as part of deployment during installation or a post-build rule.

This variable was introduced in Qt 6.3.

Note: This variable is in technology preview and may change in future releases.

QT_DEPLOY_PREFIX provides the base deployment directory. The other QT_DEPLOY_..._DIR variables should be treated as relative to this location. The value of QT_DEPLOY_PREFIX may be relative or absolute, so projects should not assume one or the other in any given situation. A relative path is expected to be treated as relative to the current working directory, as seen by the build tool (ninja, make, and so on) at install time.

The default value is $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}, which is the base location CMake uses during installation. If that evaluates to an empty string, the default value will be a dot (.) instead, which is generally the appropriate value when deploying as part of a post-build rule. This two-step fallback logic ensures that projects can assume QT_DEPLOY_PREFIX will not be an empty string, so it can safely be used as part of a path like ${QT_DEPLOY_PREFIX}/${QT_DEPLOY_BIN_DIR}.

To change the value of QT_DEPLOY_PREFIX, the project can be configured with a custom CMAKE_INSTALL_PREFIX as described in Command Line cmake invocation.

The DESTDIR environment variable can also be used to modify the final installation, and thus deployment, location.

Projects should rarely need to use this variable. In typical scenarios, deploy scripts should assume that the working directory is already set to the base install location and just use the prefix-relative QT_DEPLOY_..._DIR variables.


© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.