aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-05 17:49:30 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-12 20:58:25 +0100
commit06ab8d790dfab32472bcc20736c7486bf43beeba (patch)
treea2681afa55a583492bfd6e727d3e26474a057615 /src/qml
parente35b82922398e09779a162592cdedd50677e63cf (diff)
Add a -i <qmltypes> option to qmlcachegen
qmlcachegen needs to see the qmltypes file for the current project so that it can query it for C++ types exposed to QML. This is only relevant when generating C++ code, which qmlcachegen itself cannot do. However, in order to write a compatible drop-in, we need it. Also, hide related ignored options from --help in qmlcachegen. Change-Id: Id2f1b8b1750351c7de8dfe49e4065ef1b29423b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/Qt6QmlMacros.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index b9cee43b17..b89f824280 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -959,6 +959,11 @@ function(_qt_internal_quick_compiler_process_resources target resource_name)
set(chained_resource_name "${resource_name}_qmlcache")
endif()
+ get_target_property(qmltypes ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE)
+ if (qmltypes)
+ list(APPEND qmlcachegen_extra_args "-i" ${qmltypes})
+ endif()
+
get_target_property(direct_calls ${target} QT_QMLCACHEGEN_DIRECT_CALLS)
if (direct_calls)
list(APPEND qmlcachegen_extra_args "--direct-calls")