diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-01-30 17:29:13 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-01-31 15:19:49 +0100 |
commit | 1902f98a9d02d576d38059081a395d9cf6a342af (patch) | |
tree | 1dba7853a9de67693763bb2d07ec3381123a2741 /src/corelib/doc | |
parent | e39d13bc873a651007d45b23e1d87a676224cba2 (diff) |
Doc: Address qt_deploy_runtime_dependencies issues from API review
Pick-to: 6.7
Task-number: QTBUG-121708
Change-Id: I8b7b3a7d03ab757f3cb6e55f27f0e4ba0e4a5bbd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc | 13 | ||||
-rw-r--r-- | src/corelib/doc/src/includes/cmake-deploy-runtime-dependencies-deploy-tool-options.qdocinc | 20 |
2 files changed, 31 insertions, 2 deletions
diff --git a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc index 2ff7675ffa..ead38f4a59 100644 --- a/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc +++ b/src/corelib/doc/src/cmake/qt_deploy_runtime_dependencies.qdoc @@ -134,8 +134,9 @@ in a 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. On Linux, deploying runtime dependencies is based on CMake's \c{file(GET_RUNTIME_DEPENDENCIES)} command. The options \c{PRE_INCLUDE_REGEXES}, @@ -157,5 +158,13 @@ The default value of \c{POST_EXCLUDE_REGEXES} is constructed from the value of \section1 Example +The following example shows how to deploy an application \c{MyApp}. + \include cmake-deploy-runtime-dependencies.qdocinc + +The following example shows how to use the \c{DEPLOY_TOOL_OPTIONS} parameter to +pass different options to macdeployqt and windeployqt. + +\include cmake-deploy-runtime-dependencies-deploy-tool-options.qdocinc + */ diff --git a/src/corelib/doc/src/includes/cmake-deploy-runtime-dependencies-deploy-tool-options.qdocinc b/src/corelib/doc/src/includes/cmake-deploy-runtime-dependencies-deploy-tool-options.qdocinc new file mode 100644 index 0000000000..0f46379c45 --- /dev/null +++ b/src/corelib/doc/src/includes/cmake-deploy-runtime-dependencies-deploy-tool-options.qdocinc @@ -0,0 +1,20 @@ +\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() + +# Generate a deployment script to be executed at install time +qt_generate_deploy_script( + TARGET MyApp + OUTPUT_SCRIPT deploy_script + CONTENT " +qt_deploy_runtime_dependencies( + EXECUTABLE \"${executable_path}\" + DEPLOY_TOOL_OPTIONS "${deploy_tool_options_arg}" + GENERATE_QT_CONF + VERBOSE +)") +\endcode |