#准备
1.下载qt源码
http://mirrors.ustc.edu.cn/qtproject/official_releases/qt/
也可以单独下载模块单独编译
single为整体打包,submodule为单独源码编译。
2.下载Perl解释器
https://www.activestate.com/activeperl
安装时候记得勾选添加到PATH
3.下载Python
安装时勾选添加到PATH
#按配置生成Makefile
这里要使用config工具
通过configure -h查看所有参数
参数解释:https://doc.qt.io/qt-6/configure-options.html
中文解释:https://www.cnblogs.com/chenfulin5/p/5798764.html
注意如果是编译子模块,在Native cmd工具执行:
qt-configure-module.bat .
即可。注意后面有个点
否则需要执行:
configure -c++std c++20 -debug-and-release -force-debug-info -prefix “C:\Qt\qt6.1.2_x64” -openssl-runtime -system-sqlite -system-zlib -nomake tests -nomake examples -no-feature-accessibility -no-feature-lcdnumber -no-feature-animation -no-feature-appstore-compliant -no-feature-brotli -no-feature-cups -no-feature-hijricalendar -no-feature-islamiccivilcalendar -no-feature-jalalicalend