第一步:
.\configure -debug-and-release -opensource -prefix "D:\qt-everywhere-src\compFile" -platform win32-g++ -nomake examples
第二步:
mingw32-make -j4
第三步:
mingw32-make install
编译core与gui模块:
C:\Qt\5.15.2\yuanma\qt-everywhere-src-5.15.2\qtbase\src\gui
C:\Qt\5.15.2\yuanma\qt-everywhere-src-5.15.2\qtbase\src\corelib
裁剪Qt源码库
1. 源码库下.gitmodules文件定义了Qt所包含的子模块;
qt.pro遍历该文件获取要编译的模块;
再根据依赖排序sort_depends,将需要编译的库,按顺序放入SUBDIRS;
2. 进入到qtbase/src目录下, SUBDIRS定义了包含的模块;删除不需要的模块;
src.pro 定义了subdirs,此处删除编译不过; TEMPLATE = subdirs
sync.profile定义
qtbase.pro SUBDIRS += qmake/qmake-aux.pro doc
makefile 为啥还包含test example
成功命令:
第一步成功命令:
54.1M
.\configure -prefix D:\test\qweq\comp -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g++ -nomake examples -opensource -confirm-license -no-directfb -no-angle -no-harfbuzz -no-libpng -no-freetype -no-dbus -no-widgets
mingw32-make -j16
mingw32-make install
mingw32-make clean
第二部:尝试删除qttest 关闭network
.\configure -prefix D:\test\qweq\comp -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g++ -nomake examples -nomake tests -opensource -confirm-license -no-directfb -no-angle -no-harfbuzz -no-libpng -no-freetype -no-dbus -no-widgets
-nomake tests 无效
testlib ok
src_openglextensions ok
angle ok
zlib ok
qtConfig(xml): SUBDIRS += src_xml
network 49.4M