Qt5.15.2 Webassembly源码裁剪编译

第一步: 
    .\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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值