aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/binding/CMakeLists.txt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-08-23 16:29:18 +1000
committerCraig Scott <craig.scott@qt.io>2021-08-25 10:44:35 +1000
commit58127aa35945dc76bd71b69b25d141025267f4c8 (patch)
tree0598b09ef3a806adefc2a789abb7766405a3a180 /examples/qml/referenceexamples/binding/CMakeLists.txt
parent938aebaa14c99e1f05d3a13530e924067cbe07a3 (diff)
Update qml examples for improved target path handling
Some examples were still using the old "add as ordinary resources" approach for QML modules, others needed adjustment to the subdirectory structure to better reflect the URI structure of the QML modules involved. Task-number: QTBUG-95144 Change-Id: Ie3399410cf6df491eb1e7b4a589ca26c577d82a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9e1d2a0eb15487f8f2acb4d91b281568897fb4e1)
Diffstat (limited to 'examples/qml/referenceexamples/binding/CMakeLists.txt')
-rw-r--r--examples/qml/referenceexamples/binding/CMakeLists.txt23
1 files changed, 5 insertions, 18 deletions
diff --git a/examples/qml/referenceexamples/binding/CMakeLists.txt b/examples/qml/referenceexamples/binding/CMakeLists.txt
index fc733922bb..2a2d6575c0 100644
--- a/examples/qml/referenceexamples/binding/CMakeLists.txt
+++ b/examples/qml/referenceexamples/binding/CMakeLists.txt
@@ -35,17 +35,11 @@ target_link_libraries(binding PUBLIC
Qt::Qml
)
-
-# Resources:
-set(binding_resource_files
- "example.qml"
-)
-
-qt6_add_resources(binding "binding"
- PREFIX
- "/"
- FILES
- ${binding_resource_files}
+qt_add_qml_module(binding
+ URI People
+ VERSION 1.0
+ QML_FILES example.qml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS binding
@@ -53,10 +47,3 @@ install(TARGETS binding
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-set_target_properties(binding PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI People
-)
-
-qt6_qml_type_registration(binding)