wget https://download.qt.io/official_releases/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz
# 解压
tar -xJf qt-everywhere-opensource-src-5.15.12.tar.xz
./configure -opensource -confirm-license -verbose -release -mp -icu -qt-pcre -qt-zlib -openssl -opengl dynamic -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -no-sql-mysql -qt-sqlite -qt-tiff -qt-webp -webengine-proprietary-codecs -nomake tests -nomake examples -skip qtdoc -skip qtquickcontrols -skip qtscript -skip qtxmlpatterns
报错信息:
ERROR: Feature 'icu' was enabled, but the pre-condition 'libs.icu' failed.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
./configure -opensource -confirm-license -verbose -release -nomake tests -nomake examples
这里注意,QtWebEngine QtPdf 无法正确编译,将跳过
我这里先忽略,直接执行:
make -j8
Qt WebEngine Build Tools:
Use System Ninja ....................... no
Jumbo Build Merge Limit ................ 8
Developer build ........................ no
Sanitizer .............................. no
QtWebEngine required system libraries:
fontconfig ........................... no
dbus ................................. no
nss .................................. no
khr .................................. yes
glibc ................................ yes
Optional system libraries used:
re2 .................................. no
icu .................................. no
libwebp, libwebpmux and libwebpdemux . no
opus ................................. no
ffmpeg ............................... no
libvpx ............................... no
snappy ............................... no
glib ................................. no
zlib ................................. yes
minizip .............................. no
libevent ............................. no
libxml2 and libxslt .................. no
lcms2 ................................ no
png .................................. no
JPEG ................................. no
harfbuzz ............................. no
freetype ............................. no