From 70b558ad5b7972178b990b33cbd73694775b265f Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Tue, 19 Feb 2019 17:07:50 +1000 Subject: wasm: fix system lib detection and use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mkspecs/wasm-emscripten/qmake.conf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mkspecs/wasm-emscripten/qmake.conf') 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 -- cgit v1.2.3