summaryrefslogtreecommitdiffstats
path: root/configure.pri
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2019-08-26 18:18:34 +1000
committerLorn Potter <lorn.potter@gmail.com>2019-12-11 06:06:45 +1000
commit93d261b9650e3d1eb9347310fe8fc1f18e54e328 (patch)
tree35c5f786541299e7f5e349ea437efa7661cdd6fd /configure.pri
parentbf65c277892f6f322fa689c06d81ba9b1d9a8038 (diff)
wasm: enforce emscripten version
This creates a define in the binary, as well as writing emscripten version for qmake. It also enforces app builder to use a certain known version. Task-number: QTBUG-77745 Change-Id: I37691512171635cec66aa3ffa16258081f3f1e1b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'configure.pri')
-rw-r--r--configure.pri20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.pri b/configure.pri
index 2b8d20d607..557b8c2809 100644
--- a/configure.pri
+++ b/configure.pri
@@ -1224,6 +1224,12 @@ defineReplace(qtConfOutputPostProcess_publicPro) {
"QT_RELEASE_DATE = $$config.input.qt_release_date"
}
+ wasm: {
+ qt_emcc_version = $$qtSystemEmccVersion()
+ output += \
+ "QT_EMCC_VERSION = $$qt_emcc_version"
+ }
+
return($$output)
}
@@ -1256,6 +1262,12 @@ defineReplace(qtConfOutputPostProcess_publicHeader) {
!isEmpty(config.input.qt_libinfix): \
output += "$${LITERAL_HASH}define QT_LIBINFIX \"$$eval(config.input.qt_libinfix)\""
+ wasm: {
+ qt_emcc_version = $$qtSystemEmccVersion()
+output += \
+ "$${LITERAL_HASH}define QT_EMCC_VERSION \"$$qt_emcc_version\""
+ }
+
return($$output)
}
@@ -1338,6 +1350,14 @@ defineTest(qtConfReport_buildMode) {
qtConfReportPadded($$1, $$build_mode)
}
+defineTest(qtConfReport_emccVersion) {
+ EMCC_VERSION = $$qtSystemEmccVersion()
+ REQ_VERSION = $$qtEmccRecommendedVersion()
+ !equals(EMCC_VERSION, $$REQ_VERSION) {
+ qtConfAddReport("You should use the recommended Emscripten version $$REQ_VERSION with this Qt. You have $$EMCC_VERSION $$QT_EMCC_VERSION")
+ }
+}
+
# ensure pristine environment for configuration
discard_from($$[QT_HOST_DATA/get]/mkspecs/qconfig.pri)
discard_from($$[QT_HOST_DATA/get]/mkspecs/qmodule.pri)