QT_DEPLOY_SUPPORT

Nombre del archivo a incluir para configurar el soporte de despliegue.

Esta variable se introdujo en Qt 6.3.

Nota: Esta variable se encuentra en fase de previsualización tecnológica y puede cambiar en futuras versiones.

Nota: El valor de esta variable nunca debe ser modificado por el código del proyecto.

Esta variable configure-phase es establecida por el paquete Core. Está pensada para ser usada como la primera línea de cualquier script de despliegue para asegurar el acceso a las APIs de despliegue proporcionadas por Qt. Estos scripts de despliegue no se ejecutan durante la fase de configuración de CMake. Se ejecutan durante la instalación o como parte de una regla post-construcción.

El siguiente ejemplo muestra una forma en que la variable se utilizaría al instalar una aplicación, junto con sus dependencias de tiempo de ejecución:

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_TRANSLATIONS_DIR \"i18n\")

include(\"${QT_DEPLOY_SUPPORT}\")

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

install(SCRIPT ${deploy_script})

Ver también qt_deploy_runtime_dependencies() y qt_deploy_qml_imports().

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