summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-07-25 16:01:29 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2023-07-27 22:16:21 +0200
commit2b0d6a068fcc6723fe3dfd8ac167307f352097ff (patch)
tree4b4ed2751b6cad03301594f6ea3aa123e455cc0a /mkspecs/features
parent43480998efd664beeb5aca3c77f26323c94dd880 (diff)
Support PRELOAD var substitution for WASM main html with qmake
The PRELOAD variable in wasm_shell.html wouldn't get substituted with preload list when using qmake. Do that as it is done in cmake. Fixes: QTBUG-115507 Change-Id: I3c659626dc6fa6f4fdf9e31bd62b87fc6a7d8bbe Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Piotr WierciƄski <piotr.wiercinski@qt.io>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/wasm/wasm.prf7
1 files changed, 6 insertions, 1 deletions
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 71206ab8cd..4e969aaf5f 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -101,11 +101,16 @@ contains(TEMPLATE, .*app) {
WASM_PLUGIN_PATH = $$PWD/../../../src/plugins/platforms/wasm
}
+ PRELOAD = ""
+ shared {
+ PRELOAD = "preload:\ ['qt_plugins.json',\ 'qt_qml_imports.json'],"
+ }
+
# Copy/Generate main .html file (e.g. myapp.html) from the webassembly_shell.html by
# replacing the app name placeholder with the actual app name.
apphtml.name = application main html file
apphtml.output = $$DESTDIR/$$TARGET_HTML
- apphtml.commands = $$QMAKE_STREAM_EDITOR -e s/@APPNAME@/$$TARGET_BASE/g -e s/@APPEXPORTNAME@/$$EXPORT_NAME/g $$WASM_PLUGIN_PATH/wasm_shell.html > $$DESTDIR/$$TARGET_HTML
+ apphtml.commands = $$QMAKE_STREAM_EDITOR -e s/@APPNAME@/$$TARGET_BASE/g -e s/@APPEXPORTNAME@/$$EXPORT_NAME/g -e s/@PRELOAD@/$$PRELOAD/g $$WASM_PLUGIN_PATH/wasm_shell.html > $$DESTDIR/$$TARGET_HTML
apphtml.input = $$WASM_PLUGIN_PATH/wasm_shell.html
apphtml.depends = $$apphtml.input
QMAKE_EXTRA_COMPILERS += apphtml