1defineReplace(qtEmccRecommendedVersion) {
2    return (1.39.8)
3}
4
5defineReplace(qtSystemEmccVersion) {
6    EMCC = $$system("emcc -v 2>&1", lines)
7    EMCC_LINE = $$find(EMCC, "^.*\b(emcc)\b.*$")
8    E_VERSION = $$section(EMCC_LINE, " ", 9,9)
9    return ($${E_VERSION})
10}
11
12defineTest(qtConfTest_emccVersion) {
13
14    REQ_VERSION = $$qtEmccRecommendedVersion()
15    EMCC_VERSION = $$qtSystemEmccVersion()
16
17    !defined(QT_EMCC_VERSION, var):!equals(EMCC_VERSION, $${REQ_VERSION}) {
18        warning ("You should use the recommended Emscripten version $$REQ_VERSION with this Qt. You have $${EMCC_VERSION} ")
19    }
20    contains(TEMPLATE, .*app) {
21           !equals(QT_EMCC_VERSION, $$EMCC_VERSION)  {
22               warning("This Qt was built with Emscripten version $${QT_EMCC_VERSION}. You have $${EMCC_VERSION}. The difference may cause issues.")
23           }
24    }
25}
26