aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-06-26 15:44:23 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-06-30 09:39:55 +0000
commit41890402db086f4c61e052cef7659eb6b003dc77 (patch)
treed917de227629d6a0ea55f9e3c0897c457fe55bdd /tools
parent8bd6342639721b7db08acf554c6bcd3e7ab04cb6 (diff)
Revive QTQUICK_COMPILER_SKIPPED_RESOURCES
There are valid reasons not to compile some resources with qmlcachegen. Pick-to: 5.15 Fixes: QTBUG-85243 Change-Id: I9a1233864ed5dda0c264e61db596a9d8c80ea1f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/qtquickcompiler.prf12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/qmlcachegen/qtquickcompiler.prf b/tools/qmlcachegen/qtquickcompiler.prf
index 2e8e3f91b4..d1b7a5aad5 100644
--- a/tools/qmlcachegen/qtquickcompiler.prf
+++ b/tools/qmlcachegen/qtquickcompiler.prf
@@ -25,6 +25,13 @@ defineReplace(qmlCacheResourceFileOutputName) {
return($${name})
}
+defineTest(qtQuickSkippedResourceFile) {
+ for(skippedRes, QTQUICK_COMPILER_SKIPPED_RESOURCES) {
+ equals(1, $$skippedRes): return(true)
+ }
+ return(false)
+}
+
# Flatten RESOURCES that may contain individual files or objects
load(resources_functions)
qtFlattenResources()
@@ -34,6 +41,11 @@ NEWRESOURCES =
QMLCACHE_RESOURCE_FILES =
for(res, RESOURCES) {
+ qtQuickSkippedResourceFile($$res) {
+ NEWRESOURCES += $$res
+ next()
+ }
+
absRes = $$absolute_path($$res, $$_PRO_FILE_PWD_)
rccContents = $$system($$QMAKE_RCC_DEP -list $$system_quote($$absRes),lines)
contains(rccContents,.*\\.js$)|contains(rccContents,.*\\.qml$)|contains(rccContents,.*\\.mjs$) {