diff options
author | Craig Scott <craig.scott@qt.io> | 2021-08-23 18:26:06 +1000 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-08-25 10:44:41 +1000 |
commit | 5cdec4e0c7b0d292c4d099189dd27c19eb314f2d (patch) | |
tree | c80c25cb9b5c40fbb39fe4aea88636085987108f /examples/quick/scenegraph/metalunderqml/CMakeLists.txt | |
parent | 58127aa35945dc76bd71b69b25d141025267f4c8 (diff) |
Update quick examples to new QML CMake API
This is a pre-requisite to being able to make
qt6_qml_type_registration() an internal rather than public command.
Not all examples have been updated, only those that were using the
qt6_qml_type_registration() command.
Task-number: QTBUG-95093
Change-Id: I3f1814a29af608461daa90477eca0aa2304eb9d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a86fd709dd4d315cfe4fea77ea0bc730131fe840)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/scenegraph/metalunderqml/CMakeLists.txt')
-rw-r--r-- | examples/quick/scenegraph/metalunderqml/CMakeLists.txt | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/examples/quick/scenegraph/metalunderqml/CMakeLists.txt b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt index 6c605be0fe..752a5aa578 100644 --- a/examples/quick/scenegraph/metalunderqml/CMakeLists.txt +++ b/examples/quick/scenegraph/metalunderqml/CMakeLists.txt @@ -36,36 +36,26 @@ target_link_libraries(metalunderqml PUBLIC Qt::Quick ) - -# Resources: -set(metalunderqml_resource_files - "main.qml" - "squircle.frag" - "squircle.vert" -) - -qt6_add_resources(metalunderqml "metalunderqml" - PREFIX - "/scenegraph/metalunderqml" - FILES - ${metalunderqml_resource_files} -) - if(MACOS) target_link_libraries(metalunderqml PUBLIC "-framework AppKit" ) endif() +qt_add_qml_module(metalunderqml + URI MetalUnderQML + VERSION 1.0 + QML_FILES + main.qml + RESOURCES + squircle.frag + squircle.vert + RESOURCE_PREFIX /scenegraph/metalunderqml + NO_RESOURCE_TARGET_PATH + ) + install(TARGETS metalunderqml RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) - -set_target_properties(metalunderqml PROPERTIES - QT_QML_MODULE_VERSION 1.0 - QT_QML_MODULE_URI MetalUnderQML -) - -qt6_qml_type_registration(metalunderqml) |