summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-03-16 15:11:44 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-03-18 13:23:24 +0100
commitfd72ed794d0325e122cd42cf3c2d0e4874b7b929 (patch)
tree022c41727e663132c3381bbf7fd754334dc935d3
parent23295804111c0042d3c6b35a453a92ff32892be8 (diff)
Consider qml dependencies from qrc files in static builds
qmlimportscanner already has support for qrc files, however the rule in qt.prf did not pass the required arguments to it so far. In combination with the declarative registration of types, this broke static linking. Fixes: QTBUG-82873 Change-Id: I4462645e0b353265f9953807dee73f94923dab9f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--mkspecs/features/qt.prf10
1 files changed, 9 insertions, 1 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 3a71376029..fc46bcb74b 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -279,7 +279,15 @@ contains(all_qt_module_deps, qml): \
for (QMLPATH, QMLPATHS): \
IMPORTPATHS += -importPath $$system_quote($$QMLPATH)
- #message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
+ # add qrc files, too
+ !isEmpty(RESOURCES) {
+ IMPORTPATHS += -qrcFiles
+ for (RESOURCE, RESOURCES): \
+ IMPORTPATHS += $$absolute_path($$system_quote($$RESOURCE), $$_PRO_FILE_PWD_)
+ }
+
+
+ # message(run $$QMLIMPORTSCANNER $$_PRO_FILE_PWD_ $$IMPORTPATHS)
JSON = $$system($$QMLIMPORTSCANNER $$system_quote($$_PRO_FILE_PWD_) $$IMPORTPATHS)
parseJson(JSON, IMPORTS)| error("Failed to parse qmlimportscanner output.")