aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmltime/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmltime/CMakeLists.txt')
-rw-r--r--tools/qmltime/CMakeLists.txt23
1 files changed, 8 insertions, 15 deletions
diff --git a/tools/qmltime/CMakeLists.txt b/tools/qmltime/CMakeLists.txt
index 1486885e33..e8d2ff8f57 100644
--- a/tools/qmltime/CMakeLists.txt
+++ b/tools/qmltime/CMakeLists.txt
@@ -17,22 +17,15 @@ qt_internal_add_tool(${target_name}
Qt::QuickPrivate
)
-#### Keys ignored in scope 1:.:.:qmltime.pro:<TRUE>:
-# QMAKE_TARGET_DESCRIPTION = "QML" "Time"
-# QML_IMPORT_NAME = "QmlTime"
-# QML_IMPORT_VERSION = "1.0"
-
-## Scopes:
-#####################################################################
-
# Don't set properties on a host tool when cross compiling, because it
# is not being built.
-if(NOT CMAKE_CROSSCOMPILING OR QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
-
-set_target_properties(${target_name} PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI QmlTime
-)
-qt6_qml_type_registration(${target_name})
+if(CMAKE_CROSSCOMPILING AND NOT QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
+ return()
endif()
+# Turn the tool into its own self-contained qml module
+qt6_add_qml_module(${target_name}
+ URI QmlTime
+ VERSION 1.0
+ NO_CREATE_PLUGIN_TARGET
+)