Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.94 KB

README.md

File metadata and controls

47 lines (34 loc) · 1.94 KB

qt-webassembly-docker

A container for building Qt applications for the web platform using Qt for WebAssembly.

This container is based on the official emscripten docker image emscripten/emsdk.

The concourse pipeline is constantly building images and putting them on dockerhub madmanfred/qt-webassembly.

Please create issues related to this image on the associated GitHub project.

Usage

bash

docker run --rm -v $(pwd):/src/ -u $(id -u):$(id -g) madmanfred/qt-webassembly qmake
docker run --rm -v $(pwd):/src/ -u $(id -u):$(id -g) madmanfred/qt-webassembly make

powershell

docker run --rm -v $(PWD):/src/ madmanfred/qt-webassembly qmake
docker run --rm -v $(PWD):/src/ madmanfred/qt-webassembly make

Build status

Improving build time

Here are some tips to speed up your builds for Qt for WebAssembly:

  • You can add this to use a local directory as cache:

    -v ~/.emscripten_cache:/emsdk_portable/.data/cache
  • If you use some of the emscripten ported libraries, you can reduce the build time by a few seconds by caching /emsdk_portable/.data/ports.

  • You can also increase the compilation speed a bit by using a parallel build (make -j).

  • If you disable all optimizations you can reduce your build time significantly. Just add this to your project file:

    QMAKE_CXXFLAGS_RELEASE -= -O3
    QMAKE_CXXFLAGS_RELEASE *= -O0
    
    QMAKE_LFLAGS_RELEASE -= -O3
    QMAKE_LFLAGS_RELEASE *= -O0