Doc: Fix issues in CMake command docs

- qt_finalize_target missed a reference to qt_add_plugin()
- qt_generate_deploy_app_script is also supported on Linux
- Use simplers examples for QT_DEPLOY_SUPPORT and
  qt_standard_project_setup()

Task-number: QTBUG-113116
Pick-to: 6.5
Change-Id: If6bfd01b9615a73ab1bafddee350e49f6902a6c0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Leena Miettinen 2023-04-24 13:24:15 +02:00
parent e86fcae221
commit ab4125685a
6 changed files with 30 additions and 29 deletions

View File

@ -429,7 +429,7 @@ part of a post-build rule.
The following example shows one way the variable would be used when installing
an application, along with its runtime dependencies:
\include cmake-deploy-runtime-dependencies.qdocinc
\include cmake-deploy-modified-variable-values.qdocinc
\sa {qt6_deploy_runtime_dependencies}{qt_deploy_runtime_dependencies()},
{qt6_deploy_qml_imports}{qt_deploy_qml_imports()}

View File

@ -58,7 +58,7 @@ that is used in the project via \c{find_package}.
The \c LCONVERT argument specifies the \c lconvert executable that is used to
combine the catalogs. By default, the Qt installation's \c lconvert is used.
For debugging purposed, the \c VERBOSE argument can be set to turn on diagnostic
For debugging purposes, the \c VERBOSE argument can be set to turn on diagnostic
messages.
\sa QT_DEPLOY_TRANSLATIONS_DIR

View File

@ -32,10 +32,10 @@ was created, so this command should also be called from that same directory
scope.
This command is ordinarily invoked as part of a call to
\l{qt6_add_executable}{qt_add_executable()} or
\l{qt6_add_library}{qt_add_library()}. The timing of when that call takes
place and when it might need to be called explicitly by a project is discussed
in the documentation of those commands.
\l{qt6_add_executable}{qt_add_executable()},
\l{qt6_add_library}{qt_add_library()}, or \l{qt6_add_plugin}{qt_add_plugin()}.
The timing of when that call takes place and when a project might need to call
it explicitly, is discussed in the documentation of those commands.
\sa {qt6_set_finalizer_mode}{qt_set_finalizer_mode()}

View File

@ -13,7 +13,7 @@
\include cmake-find-package-core.qdocinc
\cmakecommandsince 6.3
\note This command is currently only supported on Windows and macOS.
\note This command is currently only supported on Windows, macOS, and Linux.
\section1 Synopsis
@ -93,25 +93,5 @@ unmodified to \l{qt6_deploy_runtime_dependencies}{qt_deploy_runtime_dependencies
\section1 Example
\badcode
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)
find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()
qt_add_executable(MyApp main.cpp)
install(TARGETS MyApp
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_app_script(
TARGET MyApp
OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})
\endcode
\include cmake-generate-deploy-app-script.qdocinc
*/

View File

@ -83,5 +83,5 @@ setting the \l{QT_NO_STANDARD_PROJECT_SETUP} variable to true.
\section1 Example
\include cmake-deploy-runtime-dependencies.qdocinc
\include cmake-generate-deploy-app-script.qdocinc
*/

View File

@ -0,0 +1,21 @@
\badcode
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)
find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()
qt_add_executable(MyApp main.cpp)
install(TARGETS MyApp
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_app_script(
TARGET MyApp
OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})
\endcode