aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tableview/pixelator/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/tableview/pixelator/CMakeLists.txt')
-rw-r--r--examples/quick/tableview/pixelator/CMakeLists.txt25
1 files changed, 6 insertions, 19 deletions
diff --git a/examples/quick/tableview/pixelator/CMakeLists.txt b/examples/quick/tableview/pixelator/CMakeLists.txt
index fcd9784913..4db28964df 100644
--- a/examples/quick/tableview/pixelator/CMakeLists.txt
+++ b/examples/quick/tableview/pixelator/CMakeLists.txt
@@ -35,18 +35,12 @@ target_link_libraries(qml_pixelator PUBLIC
Qt::Quick
)
-
-# Resources:
-set(qmake_immediate_resource_files
- "main.qml"
- "qt.png"
-)
-
-qt6_add_resources(qml_pixelator "qmake_immediate"
- PREFIX
- "/"
- FILES
- ${qmake_immediate_resource_files}
+qt_add_qml_module(qml_pixelator
+ URI ImageModel
+ VERSION 1.0
+ QML_FILES main.qml
+ RESOURCES qt.png
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS qml_pixelator
@@ -54,10 +48,3 @@ install(TARGETS qml_pixelator
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-set_target_properties(qml_pixelator PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI ImageModel
-)
-
-qt6_qml_type_registration(qml_pixelator)