Doc: Address qt_deploy_runtime_dependencies issues from API review
Task-number: QTBUG-121708 Change-Id: I8b7b3a7d03ab757f3cb6e55f27f0e4ba0e4a5bbd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1902f98a9d02d576d38059081a395d9cf6a342af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e0746c52bd
commit
7ffe548334
@ -134,8 +134,9 @@ in a customized way.
|
|||||||
For Windows desktop applications, the required runtime files for the compiler
|
For Windows desktop applications, the required runtime files for the compiler
|
||||||
are also installed by default. To prevent this, specify \c{NO_COMPILER_RUNTIME}.
|
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
|
Since Qt 6.7, you can use \c{DEPLOY_TOOL_OPTIONS} to pass additional options to
|
||||||
deployment tool.
|
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
|
On Linux, deploying runtime dependencies is based on CMake's
|
||||||
\c{file(GET_RUNTIME_DEPENDENCIES)} command. The options \c{PRE_INCLUDE_REGEXES},
|
\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
|
\section1 Example
|
||||||
|
|
||||||
|
The following example shows how to deploy an application \c{MyApp}.
|
||||||
|
|
||||||
\include cmake-deploy-runtime-dependencies.qdocinc
|
\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
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user