diff options
Diffstat (limited to 'src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc')
-rw-r--r-- | src/qml/doc/src/cmake/qt_deploy_qml_imports.qdoc | 22 |
1 files changed, 20 insertions, 2 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) |