Qt5.X编译配置

时间:2022-09-06 14:37:43

Qt5.X编译配置

# modifications to g++.conf
QMAKE_CC=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-gcc -lts
QMAKE_CXX=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++ -lts
QMAKE_LINK=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++ -lts
QMAKE_LINK_SHLIB=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-g++ -lts

# modifications to linux.conf
QMAKE_AR=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-ar cqs
QMAKE_NM=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-nm -P
QMAKE_OBJCOPY=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-objcopy
QMAKE_STRIP=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/arm-linux-gnueabihf-strip
#Qt5.7.1
#-silent终端无信息输出 -nomake tests -no-largefile 忽略qtvirtualkeyboard否则安装时会出错 去除3d模块
sudo ./configure -v -prefix /home/wyy/MySoftWare/qt5.7.1-arm -confirm-license -opensource -xplatform linux-arm-gnueabi-g++ -qpa linuxfb -optimized-qmake -nomake examples -nomake tools -no-opengl -no-eglfs -no-xcb -no-openssl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-gbm -no-kms -no-audio-backend -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-mips_dsp -no-mips_dspr2  -no-iconv -no-qml-debug -no-separate-debug-info -no-accessibility -no-gtk -no-glib -skip qt3d -skip qtcanvas3d -skip qtpurchasing -skip qtvirtualkeyboard -evdev -tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
#Qt5.9.1
sudo ./configure -release -xplatform linux-arm-gnueabi-g++ -no-opengl -prefix /home/wyy/MySoftWare/qt5.9.1-arm -opensource -confirm-license -make libs -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtsensors -skip qtserialbus -skip qtspeech -skip qtsvg -skip qttools -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -no-feature-iconv -no-feature-gestures -no-qml-debug -tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib -nomake examples -nomake tools -nomake tests -skip qtvirtualkeyboard
#Qt5.9.3
sudo ./configure  -prefix /home/wyy/MySoftWare/qt5.9.3-arm  -confirm-license -opensource -release -make libs  -xplatform linux-arm-gnueabi-g++ -optimized-qmake -linuxfb -pch   -qt-libjpeg  -qt-libpng  -qt-zlib -no-opengl -no-sse2  -no-openssl -no-cups -no-glib  -no-dbus  -no-xcb  -no-separate-debug-info -skip qtvirtualkeyboard -nomake examples -nomake tools -nomake tests -no-iconv -tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
#Qt5.3.2
sudo ./configure -v -prefix /home/wyy/MySoftWare/qt5.3.2-arm -confirm-license -opensource -release -make libs -xplatform linux-arm-gnueabi-g++ -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-zlib -no-opengl -no-sse2 -no-openssl -no-nis -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -no-iconv -no-xcb -nomake examples -nomake tools -qt-freetype -qreal float -tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
#nfs
busybox mount -t nfs -o nolock 192.168.9.151:/home/wyy/nfsroot /mnt/
#在profile中添加

##qt5.9.1-arm######################################################
export QT_ROOT=/usr/local/qt5.9.1-arm
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$QT_ROOT/lib
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_FONTDIR=$QT_ROOT/lib/fonts
export QT_QPA_GENERIC_PLUGINS=tslib
export QML_IMPORT_PATH=$QT_ROOT/qml
export QML2_IMPORT_PATH=$QT_ROOT/qml

#export QT_QPA_EVDEV_MOUSE_PARAMETERS=Intellimouse:/dev/input/event2
#export QT_QPA_EVDEV_KEYBOARD_PARAMETERS=Linuxinput:/dev/input/event3

export T_ROOT=/usr/local/tslib
export LD_LIBRARY_PATH=/usr/local/tslib/lib:$LD_LIBRARY_PATH
export TSLIB_TSEVENTTYPE=input
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=$T_ROOT/lib/ts
export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf
export POINTERCAL_FILE=/etc/pointercal
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=tslib:/dev/input/event0


####################################################################
#这里将qt库和ts库都放在/usr/local/下,将配置文件中的路径改为/usr/local/xxx
#Qt5.7.0
export TSLIB_ROOT=/opt/tslib1.4
export QT_ROOT=/opt/qt-5.7.0   
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_TSEVENTTYPE=input         
export TSLIB_CONFFILE=/opt/tslib1.4/etc/ts.conf
export TSLIB_PLUGINDIR=/opt/tslib1.4/lib/ts    
export TSLIB_CONSOLEDEVICE=none                
export TSLIB_FBDEVICE=/dev/fb0             
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$QT_ROOT/lib:$TSLIB_ROOT/lib:$TSLIB_ROOT/lib/
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins                                              
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0                                                      
export QT_QPA_FONTDIR=$QT_ROOT/lib/fonts           
export QT_QPA_GENERIC_PLUGINS=tslib