summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-24 22:55:37 +0800
committerruki <[email protected]>2020-09-24 22:55:37 +0800
commite3659747443021e53a71992710b28c12fb76adc4 (patch)
treef785d25012383b4dc4536528a43af0c473a9f992
parente372ce038de7b5bb5e76655399f37bd366326b8e (diff)
fix qt/wasm
-rw-r--r--xmake/rules/qt/xmake.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/rules/qt/xmake.lua b/xmake/rules/qt/xmake.lua
index d8f85c207..d0f2647f9 100644
--- a/xmake/rules/qt/xmake.lua
+++ b/xmake/rules/qt/xmake.lua
@@ -27,10 +27,12 @@ rule("qt._wasm_app")
if pluginsdir then
local targetdir = target:targetdir()
local htmlfile = path.join(targetdir, target:basename() .. ".html")
- os.vcp(path.join(pluginsdir, "platforms/wasm_shell.html"), htmlfile)
- io.gsub(htmlfile, "@APPNAME@", target:name())
- os.vcp(path.join(pluginsdir, "platforms/qtloader.js"), targetdir)
- os.vcp(path.join(pluginsdir, "platforms/qtlogo.svg"), targetdir)
+ if os.isfile(path.join(pluginsdir, "platforms/wasm_shell.html")) then
+ os.vcp(path.join(pluginsdir, "platforms/wasm_shell.html"), htmlfile)
+ io.gsub(htmlfile, "@APPNAME@", target:name())
+ os.vcp(path.join(pluginsdir, "platforms/qtloader.js"), targetdir)
+ os.vcp(path.join(pluginsdir, "platforms/qtlogo.svg"), targetdir)
+ end
end
end)