Download file from download.qt.io.
Or
git clone http://code.qt.io/qt/qtwebengine.git --branch 6.2.0 --single-branch qtwebengine-6.2.0
cd qtwebengine-6.2.0
git submodule update --init --depth=1 --recursive --progress
QtWebEngine requires cmake >= 3.19
, which Raspberry Pi OS shipped 3.16
:
wget https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-Linux-aarch64.tar.gz
tar xvf cmake-3.19.8-Linux-aarch64.tar.gz
cp -a cmake-3.19.8-Linux-aarch64/* /usr/local
export PATH=/usr/local/bin:$PATH
sudo apt install clang-9
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-9 60
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-9 60
Add the following line to configure.cmake
:
set(Python2_FIND_STRATEGY VERSION)
See https://github.com/qt/qtwebengine-chromium/commit/b2de8e8046dc1c558465f74b4afe11d57cbc6cf3
cmake .. -DCMAKE_PREFIX_PATH="/opt/qt6" -DQT_FEATURE_webengine_embedded_build:INTERNAL=ON \
-DQT_FEATURE_webengine_system_ffmpeg:INTERNAL=ON \
-DQT_FEATURE_webengine_system_icu:INTERNAL=OFF
Find more feature flags in QT_KNOWN_FEATURES
.
vi ./src/core/CMakeFiles/QtWebEngineCore_Release_aarch64.dir/build.make
cmake --build .
sudo cmake --install .