diff options
Diffstat (limited to 'src/corelib/doc/src/cmake/qt_generate_deploy_script.qdoc')
-rw-r--r-- | src/corelib/doc/src/cmake/qt_generate_deploy_script.qdoc | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/corelib/doc/src/cmake/qt_generate_deploy_script.qdoc b/src/corelib/doc/src/cmake/qt_generate_deploy_script.qdoc new file mode 100644 index 0000000000..eb8ed402a9 --- /dev/null +++ b/src/corelib/doc/src/cmake/qt_generate_deploy_script.qdoc @@ -0,0 +1,65 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! +\page qt-generate-deploy-script.html +\ingroup cmake-commands-qtcore + +\title qt_generate_deploy_script +\keyword qt6_generate_deploy_script + +\summary {Generate a custom deployment script.} + +\include cmake-find-package-core.qdocinc + +\cmakecommandsince 6.5 + +\section1 Synopsis + +\badcode +qt_generate_deploy_script( + OUTPUT_SCRIPT <var> + [TARGET target] + [NAME script_name] + [CONTENT content] +) +\endcode + +\versionlessCMakeCommandsNote qt6_generate_deploy_script() + +\section1 Description + +The command generates a script whose full file path will be stored in the +variable named by the \c{OUTPUT_SCRIPT} option. That script is only written +at CMake generation time. It is intended to be used with the \l{install(SCRIPT)} +command, which should come after the application's target has been installed +using \l{install(TARGETS)}. + +The command takes care of generating a file named suitably for multi-config +generators. Necessary includes are added such that Qt's CMake deployment +functions and variables are accessible. + +The \c TARGET argument specifies the target that will be deployed by the script. +This affects the file name of the generated script, unless \c NAME is specified. + +The \c NAME argument controls an identifiable portion within the deployment +script's automatically generated name. The \c NAME argument defaults to \c +custom if neither \c NAME nor \c TARGET are given. + +The \c CONTENT argument specifies the code that is written to the deployment +script. The content may contain generator expressions. + +This command is intended for generating custom deployment scripts that +directly call functions of Qt's deployment API. For less complex +deployment purposes, it is more convenient to use +\l{qt6_generate_deploy_app_script}{qt_generate_deploy_app_script()} or +\l{qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()}. + +\sa {qt6_generate_deploy_app_script}{qt_generate_deploy_app_script()}, + {qt6_generate_deploy_qml_app_script}{qt_generate_deploy_qml_app_script()} + +\section1 Example + +\snippet cmake-macros/deployment.cmake qt_generate_deploy_script_example + +*/ |