QT_DEPLOY_TRANSLATIONS_DIR

Prefix-relative subdirectory for deploying Qt translations on some target platforms.

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.5.

Projects should use QT_DEPLOY_TRANSLATIONS_DIR in their deploy scripts to avoid hard-coding a particular directory under which to deploy translations.

QT_DEPLOY_TRANSLATIONS_DIR defaults to the value translations. To change the value of QT_DEPLOY_TRANSLATIONS_DIR, set it in the project deployment script before QT_DEPLOY_SUPPORT is included.

The QT_DEPLOY_TRANSLATIONS_DIR path is relative to QT_DEPLOY_PREFIX.

This variable is not meaningful when deploying on macOS or Windows.

Example

cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)

set(CMAKE_INSTALL_BINDIR "mybindir")
set(CMAKE_INSTALL_LIBDIR "mylibdir")

find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()

qt_add_executable(MyApp main.cpp)

set(deploy_script "${CMAKE_CURRENT_BINARY_DIR}/deploy_MyApp.cmake")
file(GENERATE OUTPUT ${deploy_script} CONTENT "

set(QT_DEPLOY_PLUGINS_DIR \"mypluginsdir\")
set(QT_DEPLOY_QML_DIR \"myqmldir\")

include(\"${QT_DEPLOY_SUPPORT}\")

qt_deploy_runtime_dependencies(
    EXECUTABLE \"\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:MyApp>\"
)")

See also QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR, QT_DEPLOY_PLUGINS_DIR, and QT_DEPLOY_QML_DIR.

© 2023 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.