Qt5.15.2 Webassembly源码裁剪编译

news/2025/2/12 3:22:46/

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


http://www.ppmy.cn/news/502339.html

相关文章

layui时间控件单击双击改变状态

文章目录 1️⃣ layui单击隐藏弹出的时间窗2️⃣ layui双击隐藏弹出的时间窗2.1 找到官方的插件2.2 改变引用,加上change函数 优质资源分享 作者:xcLeigh 文章地址:https://blog.csdn.net/weixin_43151418 layui时间控件单击双击改变状态&…

雪碧图

<html lang"en"> <head><meta charset"UTF-8"><title>雪碧图</title><style type"text/css">.lian:link{display: block;width: 42px;height: 30px;background-image: url(img/1.png);background-position:…

JUC高级-0620

8. CAS 原子类&#xff1a;Atomic没有CAS之前&#xff1a;多线程环境不使用原子类保证线程安全i&#xff08;基本数据类型&#xff09;&#xff0c;可以使用synchronized&#xff0c;但是很重有CAS之后&#xff1a; 使用AtomicInteger.getAndIncrement这样的API&#xff0c;保…

C++核心编程——详解函数模板

纵有疾风起&#xff0c;人生不言弃。本文篇幅较长&#xff0c;如有错误请不吝赐教&#xff0c;感谢支持。 &#x1f4ac;文章目录 一.模板的基础知识①为什么有模板&#xff1f;②初识模板 二.函数模板①函数模板的定义②函数模板的使用③函数模板实例化1️⃣隐式实例化2️⃣显…

冷笑话第一期

有一天让梨的孔融对叔叔说&#xff1a; “我是个小孩子&#xff0c;我吃个小的就行” 觉得叔叔会说什么&#xff1f;

最最超级无敌的冷笑话,能把人噎死

最最超级无敌的冷笑话&#xff0c;能把人噎死 图片&#xff1a; 图片&#xff1a; 图片&#xff1a; 图片&#xff1a; 图片&#xff1a; 图片&#xff1a; 图片&#xff1a; Happy new year!!! 感谢河蟹网友魑魅魍魉的投递&#xff0c;原文链接1:从前有个人钓鱼&#xff0c;钓…

冷到冰点的冷笑话(18岁一下慎入)

1.中午和宿舍一兄弟到食堂吃饭&#xff0c;发现旁边餐桌有位低胸劲爆、身材火辣的MM&#xff01; 我不由得多看了几眼&#xff0c;然后压低声音对兄弟说&#xff1a;“考你道常识题&#xff0c;世界上最大的大象有多重&#xff1f;   A&#xff1a;1吨&#xff1b;B&#xff1…

100个冷笑话,越往后越冷(郁闷时专用……)

1:从前有个人钓鱼&#xff0c;钓到了只鱿鱼。 鱿鱼求他&#xff1a;你放了我吧&#xff0c;别把我烤来吃啊。 那个人说&#xff1a;好的&#xff0c;那么我来考问你几个问题吧。 鱿鱼很开心说&#xff1a;你考吧你考吧&#xff01; 然后这人就把鱿鱼给烤了.. 2&#xff1a;我曾…