这里介绍了ARM平台交差编译和x86平台编译
下载解压
qt-everywhere-opensource-src-4.8.1.tar.gz
tar xvzf qt-everywhere-opensource-src-4.8.1.tar.gz
cd /qt-everywhere-opensource-src-4.8.1
交差编译,安装交差编译器
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
交差编译,替换arm-linux-g++ 为 arm-linux-gnueabihf-g++ 等一系列
vi mkspecs/qws/linux-arm-g++/qmake.conf
:%s/arm-linux-/arm-linux-gnueabihf-/g
交差编译,不带 webkit 编译
./configure -embedded arm -xplatform qws/linux-arm-g++ -nomake demos -nomake docs -nomake examples -no-webkit -prefix /opt/qt-4.8.1-arm -little-endian -host-little-endian
交差编译,带 webkit 编译
add /usr/include/openssl/opensslconf.h
./configure -embedded arm -xplatform qws/linux-arm-g++ -nomake demos -nomake docs -nomake examples -prefix /opt/qt-4.8.1-arm -little-endian -host-little-endian
x86编译
./configure -fontconfig -nomake demos -nomake examples -prefix /opt/qt-4.8.1-x86
多核并发make
make -j4
sudo make install