diff options
| author | Dominik Holland <dominik.holland@qt.io> | 2024-05-28 17:22:01 +0200 |
|---|---|---|
| committer | Dominik Holland <dominik.holland@qt.io> | 2024-05-29 15:26:47 +0200 |
| commit | cabd37e7b3636735777a91ada4d0e219ba895eff (patch) | |
| tree | 6a7d9d876164a0a610a028d191b9416a01bc72ff /src/interfaceframework/doc/snippets | |
| parent | 16f1705b1dfa7bccc4e14883eb4ff01a4a378117 (diff) | |
CMake: Add a new qt_ifcodegen_add_qml_module function
This makes it easier to generate qml modules as it will take the URI
and VERSION from the ifcodegen template, but also allows to be passed
to the function to overwrite the values.
Fixes: QTBUG-118780
Change-Id: I15b2f06c6ac8373286d002dc64d8d34941df11df
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/interfaceframework/doc/snippets')
| -rw-r--r-- | src/interfaceframework/doc/snippets/cmake-macros/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/interfaceframework/doc/snippets/cmake-macros/CMakeLists.txt b/src/interfaceframework/doc/snippets/cmake-macros/CMakeLists.txt index c7e2f0dc..3f7a73a8 100644 --- a/src/interfaceframework/doc/snippets/cmake-macros/CMakeLists.txt +++ b/src/interfaceframework/doc/snippets/cmake-macros/CMakeLists.txt @@ -62,3 +62,17 @@ qt_ifcodegen_add_plugin(addressbook_plugin MANUAL_FINALIZATION ) #! [ifcodegen_add_plugin] + +#! [ifcodegen_add_qml_module] +find_package(Qt6 COMPONENTS InterfaceFramework) + +# Generates code using the frontend template +# and registers the library as a QML module +# The NO_PLUGIN_OPTIONAL option is passed directly +# to qt_add_qml_module. +qt_add_qml_module(addressbook + IDL_FILES addressbook.qface + TEMPLATE frontend + NO_PLUGIN_OPTIONAL +) +#! [ifcodegen_add_qml_module] |
