compilation - Modules of Qt 5.1 and their interdependency? -
i looking way create minimal static build of qt 5.1. minimal, mean build basic set of widget classes available (including 2d graphics acceleration through opengl canvas/widget). aiming static build on windows 7 32-bit using mingw-builds gcc 4.8.1 bundle of msys , tools.
i have downloaded entire source tree, , have met problems compiling due dependency of packages such openssl , icu (the latest openssl did not compile). wanted see, if avoid dependencies of these packages and, @ same time, achieve minimal static build of qt 5.1 final executable not gigantic in size.
i took @ list: http://download.qt-project.org/official_releases/qt/5.1/5.1.0/submodules/.
q1: of these modules, need select have basic qt build without fancy stuff?
q2: these modules interdependent on each other in way (i assume dependent on "qtbase")?
q3: use names list, (for example: "qtxmlpatterns", "qtx11extras", "qtwebkit", etc.), deselect them in configuration of qt build?
it nice, explanation of various submodules of qt 5? if point links or docs illuminating words on subject, great.
i shared same goal. wanted "minify" qt, building small subset of libraries/dll(s) , omitting rest.
i did succeed, @ least on mac os x. assume approach work on other platforms, too.
i thought trick find kind of exclusion flags "configure" script, turned out not case.
here did:
download source distribution (in case, qt-everywhere-opensource-src-5.1.1). of course, extract all.
edit following 3 "pro" files. these files in qt-specific format (but plain text). platform-independent project files qt (via qmake) uses generate makefiles.
- qtbase/src/src.pro
- qtbase/src/plugins/plugins.pro
- qtbase/examples/examples.pro
all changes made "pro" files deletions. deleted references to: dbus, ipc, network, qtconcurrent, sql, xml, sqldrivers, qdbusxml2cpp, qdbuscpp2xml, src_dbus, src_concurrent, src_sql, src_network.
that last part may sound scary. wasn't.
the pro files contain list of module names, plugin names, , directory names. seemed straightforward how delete (for example) sql-related lines.
step 3.
the usual configure/make/install. however, note "module-qtbase" argument passed make:
./configure -prefix ~/my_test_dir/ make -j2 module-qtbase make -j2 module-qtbase-install_subtargets
success. built , installed essentials (qtcore, qtgui, qtopengl, qtwidgets) , skipped supporting dylibs qtconcurrent, qtmultimedia, qtsql, , qtwebkit.
Comments
Post a Comment