summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2019-02-19 17:07:50 +1000
committerLorn Potter <lorn.potter@gmail.com>2019-02-20 23:03:09 +0000
commit70b558ad5b7972178b990b33cbd73694775b265f (patch)
tree93ec07e130bf60578922d7a840a3139f154740a2 /mkspecs
parentca32a373b31b087b602ca555151e01ed8ea601c1 (diff)
wasm: fix system lib detection and use
This is a revert of eea08d376ac5cb35ff03be630923f21f7fa3aecd. We need these flags to be added to the compiler in order to find the emscripten ports to be able to use them. Task-number: QTBUG-73127 Change-Id: Icf70f456947aef04dc79b2328f2e95fb1e94fcf8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index 6c4e62aff2..a9ded4be12 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -21,6 +21,11 @@ EMCC_COMMON_LFLAGS = \
--bind \
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
+EMCC_USE_PORTS_FLAGS = \
+ -s USE_LIBPNG=1 \
+ -s USE_FREETYPE=1 \
+ -s USE_ZLIB=1
+
# The -s arguments can also be used with release builds,
# but are here in debug for clarity.
EMCC_COMMON_LFLAGS_DEBUG = \
@@ -38,6 +43,9 @@ QMAKE_COMPILER += emscripten
QMAKE_CC = emcc
QMAKE_CXX = em++
+QMAKE_CFLAGS += $$EMCC_USE_PORTS_FLAGS
+QMAKE_CXXFLAGS += $$EMCC_USE_PORTS_FLAGS
+
# Practical debugging setup:
# "-g4" preserves function names for stack traces
# "-Os" produces reasonably sized binaries