QT_배포_번역_dir

일부 대상 플랫폼에 Qt 번역을 배포하기 위한 접두사 상대 하위 디렉터리입니다.

이 변수는 QT_DEPLOY_SUPPORT로 명명된 스크립트에 의해 정의됩니다. 설치 중 배포 또는 빌드 후 규칙의 일부로만 사용해야 합니다.

참고: 이 변수는 저수준 배포 API 변수이며, qt_generate_deploy_app_script와 같은 상위 수준 API 명령에서 다루지 않는 고급 사용 사례에만 사용해야 합니다.

이 변수는 Qt 6.5에 도입되었습니다.

프로젝트는 번역을 배포할 특정 디렉터리를 하드 코딩하지 않도록 배포 스크립트에 QT_DEPLOY_TRANSLATIONS_DIR 을 사용해야 합니다.

QT_DEPLOY_TRANSLATIONS_DIR 기본값은 translations 입니다. QT_DEPLOY_TRANSLATIONS_DIR 의 값을 변경하려면 QT_DEPLOY_SUPPORT 이 포함되기 전에 프로젝트 배포 스크립트에서 설정하세요.

QT_DEPLOY_TRANSLATIONS_DIR 경로는 QT_DEPLOY_PREFIX에 상대적입니다.

이 변수는 macOS 또는 Windows에서 배포할 때는 의미가 없습니다.

예제

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

# The following CMAKE_INSTALL_*DIR variables are used to initialize their
# QT_DEPLOY_*_DIR counterparts.
set(CMAKE_INSTALL_BINDIR "mybindir")
set(CMAKE_INSTALL_LIBDIR "mylibdir")
set(CMAKE_INSTALL_LIBEXECDIR "mylibexecdir")

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\")
set(QT_DEPLOY_TRANSLATIONS_DIR \"i18n\")

include(\"${QT_DEPLOY_SUPPORT}\")

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

install(SCRIPT ${deploy_script})

QT_DEPLOY_SUPPORT, QT_DEPLOY_PREFIX, QT_DEPLOY_BIN_DIR, QT_DEPLOY_LIB_DIR, QT_DEPLOY_LIBEXEC_DIR, QT_DEPLOY_PLUGINS_DIRQT_DEPLOY_QML_DIR도참조하세요 .

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