wasm: remove dependency on perl to find emscripten version

Change-Id: I0d5224d497b2b5652d1be036f2a90c6c53f0c9df
Fixes: QTBUG-81722
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
bb10
Lorn Potter 2020-01-31 08:14:51 +10:00
parent 2865a58a2a
commit 1635848d87
1 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,9 @@ defineReplace(qtEmccRecommendedVersion) {
}
defineReplace(qtSystemEmccVersion) {
E_VERSION = $$system("emcc -v 2>&1 | perl -alne $$shell_quote($_ = $F[9]; s/://; print;) ")
EMCC = $$system("emcc -v 2>&1", lines)
EMCC_LINE = $$find(EMCC, "^.*\b(emcc)\b.*$")
E_VERSION = $$section(EMCC_LINE, " ", 9,9)
return ($${E_VERSION})
}