aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/methods/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/methods/CMakeLists.txt')
-rw-r--r--examples/qml/referenceexamples/methods/CMakeLists.txt23
1 files changed, 5 insertions, 18 deletions
diff --git a/examples/qml/referenceexamples/methods/CMakeLists.txt b/examples/qml/referenceexamples/methods/CMakeLists.txt
index 0fc043fb8b..304aa3082a 100644
--- a/examples/qml/referenceexamples/methods/CMakeLists.txt
+++ b/examples/qml/referenceexamples/methods/CMakeLists.txt
@@ -32,17 +32,11 @@ target_link_libraries(methods PUBLIC
Qt::Qml
)
-
-# Resources:
-set(methods_resource_files
- "example.qml"
-)
-
-qt6_add_resources(methods "methods"
- PREFIX
- "/"
- FILES
- ${methods_resource_files}
+qt_add_qml_module(methods
+ URI People
+ VERSION 1.0
+ QML_FILES example.qml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS methods
@@ -50,10 +44,3 @@ install(TARGETS methods
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-set_target_properties(methods PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI People
-)
-
-qt6_qml_type_registration(methods)