根据上述方法方式进行裁剪,本人所裁剪QT配置(保存在qteverywhere.sh):
#!/bin/sh
./configure \
-prefix /usr/local/arm/qt4.8.6\
-opensource \
-confirm-license \
-release \
-static \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24,32 \
-fast \
-optimized-qmake \
-little-endian -host-little-endian \
-pch \
-no-sql-sqlite -no-sql-mysql -no-sql-psql -no-sql-oci -no-sql-tds -no-sql-odbc -no-sql-db2 -no-sql-sqlite2 -no-sql-ibase\
-no-libjpeg \
-no-gif \
-qt-zlib \
-qt-libpng \
-no-libmng \
-no-webkit \
-no-openssl \
-no-glib \
-no-qt3support \
-no-libtiff \
-no-opengl \
-no-mmx -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-3dnow -no-avx -no-neon \
-no-qvfb \
-no-phonon \
-no-nis \
-no-opengl \
-no-cups \
-no-xcursor \
-no-script \
-no-scripttools \
-no-svg \
-no-javascript-jit \
-no-separate-debug-info \
-no-dbus \
-no-exceptions \
-no-declarative \
-nomake docs \
-make lib \
-make include \
-no-largefile \
-no-xmlpatterns \
-no-multimedia \
-no-gtkstyle \
-no-openvg \
-no-sm \
-no-xshape \
-no-xvideo \
-no-xsync \
-no-xfixes \
-no-xinerama \
-no-mitshm \
-no-xinput \
-no-xkb \
-no-accessibility \
-qt-mouse-tslib \
-no-mouse-linuxinput \
-qt-kbd-linuxinput \
-qt-gfx-transformed \
-qt-gfx-linuxfb \
-I/usr/local/arm/tslib/include \
-L/usr/local/arm/tslib/lib \
-DQT_NO_QWS_CURSOR \
-qconfig wang
#-nomake examples -nomake tools -nomake docs \
#-no-xcursor -no-xfixes -no-xrandr -no-xrender \
make -j8
make install -j8
#exit
其中-qconfig wang 是利用目录/tools/qconfig的工具:
使用命令
/usr/share/qt4/bin/qmake (桌面qmake,即x86)
make
此时生成qconfig可执行文件,./qconfig后打开src/corelib/global /qfeatures.h即可进行配置
提示:在某种情况下使用命令行并不能实现上面界面的出现。现在可以使用另一种方案,简单又方便
1、将qconfig文件复制到其他文件夹(最好是容易找到的,方便以后配置)
2、创建新的QT项目,将qconfig里的文件添加到新建项目的pro文件
3、设置编译环境(需要用桌面qmake编译,否则无法运行)
4、然后进行尽情的删减,删减后保存文件(qconfig-wang.h,保存路径要注意src/corelib/global /qconfig-wang.h)
5、裁剪完后即可执行编译:./qteverywhere.sh