summaryrefslogtreecommitdiffstats
path: root/examples/positioning/satelliteinfo/CMakeLists.txt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-08-18 18:16:17 +1000
committerCraig Scott <craig.scott@qt.io>2021-08-23 17:26:32 +1000
commit03b026e2c46ac8badd7391897b67a54358479bfa (patch)
tree0384c8c87457a92bbe1a90d8fffa5b2035b64d50 /examples/positioning/satelliteinfo/CMakeLists.txt
parent295df0380fffa7ea43c36c26e51bc7ff4d158710 (diff)
Use the new QML CMake API for examples, tests and docs
The qt6_qml_type_registration() command will become internal. Update the examples, tests and docs to no longer call this command and use the new QML CMake API available from Qt 6.2 instead. Task-number: QTBUG-95093 Pick-to: 6.2 Change-Id: Ibd62ccb4e2723a64d8a2c4418982037419d19855 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples/positioning/satelliteinfo/CMakeLists.txt')
-rw-r--r--examples/positioning/satelliteinfo/CMakeLists.txt22
1 files changed, 5 insertions, 17 deletions
diff --git a/examples/positioning/satelliteinfo/CMakeLists.txt b/examples/positioning/satelliteinfo/CMakeLists.txt
index 21613877..dd90a6e1 100644
--- a/examples/positioning/satelliteinfo/CMakeLists.txt
+++ b/examples/positioning/satelliteinfo/CMakeLists.txt
@@ -35,17 +35,11 @@ target_link_libraries(satelliteinfo PRIVATE
Qt::Quick
)
-
-# Resources:
-set(satelliteinfo_resource_files
- "satelliteinfo.qml"
-)
-
-qt6_add_resources(satelliteinfo "satelliteinfo"
- PREFIX
- "/"
- FILES
- ${satelliteinfo_resource_files}
+qt_add_qml_module(satelliteinfo
+ URI Local
+ VERSION 1.0
+ QML_FILES satelliteinfo.qml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS satelliteinfo
@@ -53,9 +47,3 @@ install(TARGETS satelliteinfo
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-set_target_properties(satelliteinfo PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI Local
-)
-qt6_qml_type_registration(satelliteinfo)