aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/signal/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/signal/CMakeLists.txt')
-rw-r--r--examples/qml/referenceexamples/signal/CMakeLists.txt25
1 files changed, 6 insertions, 19 deletions
diff --git a/examples/qml/referenceexamples/signal/CMakeLists.txt b/examples/qml/referenceexamples/signal/CMakeLists.txt
index b309efc576..23e494f7c9 100644
--- a/examples/qml/referenceexamples/signal/CMakeLists.txt
+++ b/examples/qml/referenceexamples/signal/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from signal.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(signal LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -34,17 +34,11 @@ target_link_libraries(signal PUBLIC
Qt::Qml
)
-
-# Resources:
-set(signal_resource_files
- "example.qml"
-)
-
-qt6_add_resources(signal "signal"
- PREFIX
- "/"
- FILES
- ${signal_resource_files}
+qt_add_qml_module(signal
+ URI People
+ VERSION 1.0
+ QML_FILES example.qml
+ NO_RESOURCE_TARGET_PATH
)
install(TARGETS signal
@@ -52,10 +46,3 @@ install(TARGETS signal
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-set_target_properties(signal PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI People
-)
-
-qt6_qml_type_registration(signal)