aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-02-28 17:18:59 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-02 17:14:29 +0000
commitc21a2eda4d861e7908f8ba6143ba82d84fdad99e (patch)
tree0a64709569535b800b9b3d2406bca2069af6308c /src/qml/doc
parent4c4813b12b423f8a72ceaab1c17437d69b2606ef (diff)
CMake: Clean up deployment docs for 6.3
Add 6.3 version requirement to doc snippets that use the deployment api. Update the qt_deploy_qml_import doc snippet to show case usage of all the options provided by the function. Fixes: QTBUG-100926 Change-Id: I81abef21cf7b8bfdd09fc53c7b7dacba994bd78c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 6d0307b443c5f6e40a820e3cfc8c28fc6e5f77de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc22
-rw-r--r--src/qml/doc/src/cmake/qt_generate_deploy_qml_app_script.qdoc2
-rw-r--r--src/qml/doc/src/cmake/qt_query_qml_module.qdoc2
3 files changed, 22 insertions, 4 deletions
diff --git a/src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc b/src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc
index 9d7f33e7bd..369e698c39 100644
--- a/src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc
+++ b/src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc
@@ -99,7 +99,7 @@ named by the \c{PLUGINS_FOUND} option, if given. This is often passed as the
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)
-find_package(Qt6 REQUIRED COMPONENTS Core Qml)
+find_package(Qt6 6.3 REQUIRED COMPONENTS Core Qml)
qt_standard_project_setup()
qt_add_executable(MyApp main.cpp)
@@ -114,7 +114,25 @@ set(deploy_script "${CMAKE_CURRENT_BINARY_DIR}/deploy_MyApp.cmake")
file(GENERATE OUTPUT ${deploy_script} CONTENTS "
include(\"${QT_DEPLOY_SUPPORT}\")
-qt_deploy_qml_imports(TARGET MyApp)
+qt_deploy_qml_imports(
+ # Deploy QML modules used by MyApp
+ TARGET MyApp
+
+ # The found QML plugins are stored in the plugins_found variable
+ PLUGINS_FOUND plugins_found
+
+ # The QML modules will be deployed into a custom directory
+ QML_DIR \"myqmldir\"
+
+ # Qt QML modules will be skipped, only project-created QML modules will be deployed
+ NO_QT_IMPORTS
+)
+# Deploy application runtime dependencies and runtime dependencies
+# of the found QML module plugins.
+qt_deploy_runtime_dependencies(
+ EXECUTABLE \${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:MyApp>
+ ADDITIONAL_MODULES \${plugins_found}
+)
")
install(TARGETS MyApp)
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 98ea30caa7..360d602f8c 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
@@ -125,7 +125,7 @@ same target.
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)
-find_package(Qt6 REQUIRED COMPONENTS Core Qml)
+find_package(Qt6 6.3 REQUIRED COMPONENTS Core Qml)
qt_standard_project_setup()
qt_add_executable(MyApp main.cpp)
diff --git a/src/qml/doc/src/cmake/qt_query_qml_module.qdoc b/src/qml/doc/src/cmake/qt_query_qml_module.qdoc
index e26c018c90..ec017ba3e7 100644
--- a/src/qml/doc/src/cmake/qt_query_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_query_qml_module.qdoc
@@ -162,7 +162,7 @@ absolute. The meaning and usage of \c RESOURCES_DEPLOY_PATHS and
cmake_minimum_required(VERSION 3.16...3.22)
project(MyThings)
-find_package(Qt6 REQUIRED COMPONENTS Core Qml)
+find_package(Qt6 6.3 REQUIRED COMPONENTS Core Qml)
set(module_name "MyThings")
qt_add_qml_module(${module_name}