diff options
author | Craig Scott <craig.scott@qt.io> | 2021-05-31 16:40:54 +1000 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-05 12:52:00 +0200 |
commit | 5e8feb64d6a3cf50360c066e4595e41021bd0f9c (patch) | |
tree | c7901024f6c082dab14c97d109853ab5a64db1e1 /src/quicktemplates2/CMakeLists.txt | |
parent | 284936db8327f030473c0533041ee850f5369bdd (diff) |
Update to latest qml CMake API
The new qml CMake API places a closer relationship between
the backing target and the plugin target. Both are typically
created together and they share a lot of common details.
Instead of creating them in different parts of the source
tree, they are now specified together. The src/imports
area has effectively been absorbed into the other
corresponding subdirectories below src with this change.
Task-number: QTBUG-91621
Change-Id: I9bd32e9eb78c198ccc9db04e2829303cac323502
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quicktemplates2/CMakeLists.txt')
-rw-r--r-- | src/quicktemplates2/CMakeLists.txt | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/quicktemplates2/CMakeLists.txt b/src/quicktemplates2/CMakeLists.txt index 4f4bf55206..b326e467cb 100644 --- a/src/quicktemplates2/CMakeLists.txt +++ b/src/quicktemplates2/CMakeLists.txt @@ -1,10 +1,16 @@ -# Generated from quicktemplates2.pro. - ##################################################################### ## QuickTemplates2 Module: ##################################################################### -qt_internal_add_module(QuickTemplates2 +qt_internal_add_qml_module(QuickTemplates2 + URI "QtQuick.Templates" + VERSION "${PROJECT_VERSION}" + CLASSNAME QtQuickTemplates2Plugin + DEPENDENCIES + QtQuick/auto + PLUGIN_TARGET qtquicktemplates2plugin + NO_PLUGIN_OPTIONAL + NO_GENERATE_PLUGIN_SOURCE SOURCES accessible/qaccessiblequickpage.cpp accessible/qaccessiblequickpage_p.h qquickabstractbutton.cpp qquickabstractbutton_p.h @@ -131,16 +137,6 @@ qt_internal_add_module(QuickTemplates2 Qt::Quick ) -#### Keys ignored in scope 1:.:.:quicktemplates2.pro:<TRUE>: -# MODULE = "quicktemplates2" -# QMLTYPES_FILENAME = "plugins.qmltypes" -# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtQuick/Templates" -# QML_IMPORT_NAME = "QtQuick.Templates" -# QML_IMPORT_VERSION = "$$QT_VERSION" - -## Scopes: -##################################################################### - qt_internal_extend_target(QuickTemplates2 CONDITION TARGET Qt::QmlModels LIBRARIES Qt::QmlModelsPrivate @@ -156,12 +152,9 @@ qt_internal_extend_target(QuickTemplates2 CONDITION QT_FEATURE_quick_listview AN qquicktumbler_p_p.h ) -set_target_properties(QuickTemplates2 PROPERTIES - QT_QML_MODULE_INSTALL_QMLTYPES TRUE - QT_QML_MODULE_VERSION ${PROJECT_VERSION} - QT_QML_MODULE_URI QtQuick.Templates - QT_QMLTYPES_FILENAME plugins.qmltypes - QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtQuick/Templates" +qt_internal_extend_Target(qtquicktemplates2plugin + SOURCES + qtquicktemplates2plugin.cpp + LIBRARIES + Qt::QuickTemplates2Private ) - -qt6_qml_type_registration(QuickTemplates2) |