Last active
May 26, 2024 05:56
-
-
Save cajus/689eca85be257997019065979799e2f6 to your computer and use it in GitHub Desktop.
Building Qt for WebAssembly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get dependencies in place (example for Debian based systems) | |
sudo apt-get build-dep --yes qt5-default | |
sudo apt-get install --yes libxcb-xinerama0-dev git python cmake default-jre | |
# Install Emscripten | |
git clone https://github.com/juj/emsdk.git | |
cd emsdk | |
./emsdk install latest | |
./emsdk activate latest | |
source emsdk_env.sh | |
cd .. | |
# Build Qt | |
git clone -b 5.12.0 https://code.qt.io/qt/qt5.git | |
cd qt5 | |
./init-repository -f --module-subset=qtbase,qtdeclarative,qtwebsockets,qtsvg,qtquickcontrols,qtquickcontrols2,qtgraphicaleffects | |
./configure -opensource -confirm-license -xplatform wasm-emscripten -release -static -no-feature-thread -nomake examples -no-dbus -no-ssl | |
make | |
cd .. | |
# Build your project | |
git clone https://github.com/msorvig/qt-webassembly-examples.git | |
cd qt-webassembly-examples/quick_controls2_gallery | |
../../../qt5/qtbase/bin/qmake | |
make | |
# Serve it and browse to http://localhost:8000/gallery.html | |
python -mSimpleHTTPServer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'x86intrin.h' file not found
I solved this error by switching to qt-5.13.