Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
QtWebEngine/Qt5Build
Jump to navigation
Jump to search
Building on MacOS
Install build dependencies
QtWebEngine 5.x series require Python 2.7 which is not longer supported, therefore the easy way to obtain it is use pyenv.
brew install pyenv
pyenv install -l
pyenv install 2.7.18
pyenv global 2.7.18
pyenv init --path
export PATH="/Users/qt/.pyenv/shims:${PATH}"
ulimit -n 1200
Obtain sources code
mkdir qt5
cd qt5
git clone git://code.qt.io/qt/qtbase.git
git clone git://code.qt.io/qt/qtdeclarative.git
git clone git://code.qt.io/qt/qtwebengine.git
cd qtwebenigne
git submodule update
cd ..
Configure Build for x86 or for arm64 on Big Sur
mkdir -p build/qtbase
cd build/qtbase
../../qtbase/configure -opensource -confirm-license -verbose -prefix /Users/qt/install/5.15.release -release -force-debug-info -separate-debug-info -nomake tests -nomake examples -no-pch
=Configure to crosscompile build x86_64 -> arm64
mkdir -p build/qtbase
cd build/qtbase
../../qtbase/configure -opensource -confirm-license -verbose -prefix /Users/qt/install/5.15.release -release -force-debug-info -separate-debug-info -nomake tests -nomake examples -no-pch -device-option QMAKE_APPLE_DEVICE_ARCHS="arm64"
=Configure to unviersal build build x86_64,arm64 mkdir -p build/qtbase cd build/qtbase ../../qtbase/configure -opensource -confirm-license -verbose -prefix /Users/qt/install/5.15.release -release -force-debug-info -separate-debug-info -nomake tests -nomake examples -no-pch QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" </syntaxhighlight>
Build qtbase
make -j12
make install
cd ..
Build qtdeclarative
mkdir qtdeclarative
cd qtdeclarative
/Users/qt/install/5.15.release/bin/qmake ../../qtdeclarative/
make -j12
make install
Build qtwebengine
mkdir qtwebengine
cd qtwebengine
/Users/qt/install/5.15.release/bin/qmake ../../qtwebengine/
make -j12
make install