aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-01-21 14:30:08 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-01-24 12:31:38 +0000
commit7590f07278ae2cc4ddade7668b5c34ce16751260 (patch)
tree6bef6db63107c16cd27f04e456ef1a0ec7d74355 /src/qmlworkerscript
parenta58a246657442846150c31ebcfdc75148b7c6ee7 (diff)
QML Type Registrar changes
Change-Id: I36254a688f575e6c7f717ee4019e4d49f73a60f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r--src/qmlworkerscript/.prev_CMakeLists.txt10
-rw-r--r--src/qmlworkerscript/CMakeLists.txt10
2 files changed, 20 insertions, 0 deletions
diff --git a/src/qmlworkerscript/.prev_CMakeLists.txt b/src/qmlworkerscript/.prev_CMakeLists.txt
index f9cf2dbd5f..0a27479d36 100644
--- a/src/qmlworkerscript/.prev_CMakeLists.txt
+++ b/src/qmlworkerscript/.prev_CMakeLists.txt
@@ -5,6 +5,7 @@
#####################################################################
qt_add_module(QmlWorkerScript
+ GENERATE_METATYPES
SOURCES
qquickworkerscript.cpp qquickworkerscript_p.h
qtqmlworkerscriptglobal.h qtqmlworkerscriptglobal_p.h
@@ -99,3 +100,12 @@ qt_add_docs(QmlWorkerScript
doc/qtqmlworkerscript.qdocconf
)
+
+set_target_properties(QmlWorkerScript PROPERTIES
+ QT_QML_MODULE_INSTALL_QMLTYPES TRUE
+ QT_QML_MODULE_VERSION 2.15
+ QT_QML_MODULE_URI QtQml.WorkerScript
+ QT_QML_MODULE_INSTALL_DIR "${Qt6_DIR}/../../../qml/QtQml/WorkerScript.2"
+)
+
+qt6_qml_type_registration(QmlWorkerScript)
diff --git a/src/qmlworkerscript/CMakeLists.txt b/src/qmlworkerscript/CMakeLists.txt
index 1f61555bd1..1ecc6d03f7 100644
--- a/src/qmlworkerscript/CMakeLists.txt
+++ b/src/qmlworkerscript/CMakeLists.txt
@@ -5,6 +5,7 @@
#####################################################################
qt_add_module(QmlWorkerScript
+ GENERATE_METATYPES
SOURCES
qquickworkerscript.cpp qquickworkerscript_p.h
qtqmlworkerscriptglobal.h qtqmlworkerscriptglobal_p.h
@@ -99,3 +100,12 @@ qt_add_docs(QmlWorkerScript
doc/qtqmlworkerscript.qdocconf
)
+
+set_target_properties(QmlWorkerScript PROPERTIES
+ QT_QML_MODULE_INSTALL_QMLTYPES TRUE
+ QT_QML_MODULE_VERSION 2.15
+ QT_QML_MODULE_URI QtQml.WorkerScript
+ QT_QML_MODULE_INSTALL_DIR "${Qt6_DIR}/../../../qml/QtQml/WorkerScript.2"
+)
+
+qt6_qml_type_registration(QmlWorkerScript)