Windows
一、下载源代码,解压
二、安装软件
1、编译工具msvc,cmake,python3,jom
2、依赖库(用于编译QSSL模块)
2.1下载openssl 1.1源码并编译
Win10_64bit源码nmake方式安装OpenSSL_nmake安装-CSDN博客
2.2 如果编译QWebEngine模块,需要安装Nodejs
三、打开x64 Native Tools Command Prompt
cd到源代码文件夹的上一级目录
mkdir qt-build
cd qt-build
"../qt-everywhere-src-5.15.13/configure.bat" -prefix "D:/Qt/5.15.13_selfbuild" -debug -platform win32-msvc -nomake tests -nomake examples -opensource -confirm-license -openssl-linked -I D:\OpenSSL-Win64\include -L D:\OpenSSL-Win64\lib
注:-debug表示只编译debug,如也需要release则去除;-prefix为安装目录
四、编译和安装
jom -j 8
jom install
注:-j 8表多核编译,根据CPU核心数指定
Qt官方文档