aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlcachegen
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-09-18 09:12:15 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-09-19 11:32:29 +0200
commit227be82e4cf4b0fc58d4d50154cee7c45eb03777 (patch)
treef185ac3b9b8209c716cbe506d78976a61b8ded90 /tools/qmlcachegen
parentd5f3e7a7e319c6bd8fa8b79d8da7a6fd62b50f01 (diff)
Fix link errors when enabling CONFIG+=qtquickcompiler on non-QML projects
Re-apply commit c5578b16d6454e708c8ce12661a85d41eeaaa758 now that with commit 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c the .qml/.js/etc. files are always retained. The difference is that now this is not an error situation but merely a reason to skip processing. Fixes: QTBUG-73669 Change-Id: I53e1e7d471a66e82694ceca83c548c03aaf88f87 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools/qmlcachegen')
-rw-r--r--tools/qmlcachegen/qtquickcompiler.prf10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf
index cb3b028e8d..a31a7f5714 100644
--- a/tools/qmlcachegen/qtquickcompiler.prf
+++ b/tools/qmlcachegen/qtquickcompiler.prf
@@ -1,5 +1,15 @@
if(qtc_run|lupdate_run): return()
+!contains(QT, qml) {
+ qt_modules = \
+ $$replace(QT, -private$, _private) \
+ $$replace(QT_PRIVATE, -private$, _private)
+ qt_modules = $$resolve_depends(qt_modules, "QT.", ".depends" ".run_depends")
+ !contains(qt_modules, qml): \
+ return()
+ unset(qt_modules)
+}
+
qtPrepareTool(QML_CACHEGEN, qmlcachegen, _FILTER)
qtPrepareTool(QMAKE_RCC, rcc, _DEP)