diff options
-rw-r--r-- | src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc b/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc index 981a10dded..0d5088e7e5 100644 --- a/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc +++ b/src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc @@ -104,8 +104,9 @@ customized way. For Windows desktop applications, the required runtime files for the compiler are also installed by default. To prevent this, specify \c{NO_COMPILER_RUNTIME}. -You can use \c{DEPLOY_TOOL_OPTIONS} to pass additional options to the underlying -deployment tool. +Since Qt 6.7, you can use \c{DEPLOY_TOOL_OPTIONS} to pass additional options to +the underlying deployment tool. This only has an effect if the underlying +deployment tool is either macdeployqt or windeployqt. The options \c{PRE_INCLUDE_REGEXES}, \c{PRE_EXCLUDE_REGEXES}, \c{POST_INCLUDE_REGEXES}, \c{POST_EXCLUDE_REGEXES}, \c{POST_INCLUDE_FILES}, and @@ -125,6 +126,8 @@ same target. \section1 Example +The following example shows how to deploy a QtQuick app. + \badcode cmake_minimum_required(VERSION 3.16...3.22) project(MyThings) @@ -153,4 +156,22 @@ qt_generate_deploy_qml_app_script( ) install(SCRIPT ${deploy_script}) \endcode + +The following example shows how to pass additional options to the underlying +deployment tool. + +\badcode +set(deploy_tool_options_arg "") +if(APPLE) + set(deploy_tool_options_arg --hardened-runtime) +elseif(WIN32) + set(deploy_tool_options_arg --no-compiler-runtime) +endif() + +qt_generate_deploy_qml_app_script( + ... + DEPLOY_TOOL_OPTIONS ${deploy_tool_options_arg} +) +install(SCRIPT ${deploy_script}) +\endcode */ |