版主
主题
回帖0
积分10609
阅读权限200
注册时间2008-11-22
最后登录1970-1-1
在线时间 小时
|
1 平台说明/ l; C& [: b" w8 v& c) F
主机平台: Ubuntu 14.04* C [7 q! e! a, q
$ E, w, H4 U3 N* f# ~' T$ ^2 ]
交叉工具链: FrendlyARM的 arm-Linux-gcc-4.5.1-v6-vfp-20120301.tgz
) e! E( M5 K( e+ ^% _( j目标平台:FrendlyARM的Smart210开发板。(Soc是三星的S5PV210,内核是cortex-a8,下面的移植方法是普适的,不是此平台的也可参考下面的移植步骤)9 ^! M, N/ [. |* \9 h
$ t' j0 u% }7 b8 ?, c; \+ C
Qt版本: Qt-5.3.20 l' n, a/ P7 K1 _( r/ _
: s8 K: }2 {; a. e' p5 D2 Qt5.3.2在ARM-Linux平台(Mini210开发板)的移植
7 |: Q) P& C' {' [进入Qt5.3.2的源码顶级目录,按照linux系统中自编译软件通用的三个步骤依次执行 ./configure 、make 、make install 即可完成Qt5的编译安装。在执行之前,首先看一下configure的帮助,了解一下各个配置项的作用。
6 `6 Y* T" I% N7 W% B- ~. X/ W4 J5 s# N, ]' ]2 o
$ ./configure --help >help.txt ; vi help.txt
( N# D/ V+ `6 H0 y3 `
3 g( e) `# I' c W6 U" T# U$ m- U; q* s/ B& `' B
配置时需要注意的几点是:
) M1 @1 x, Y$ O& O {8 Y, z& w9 u5 k8 O# y' Z
如果是交叉编译,需要配置 xplatform选项,比如要在arm-linux平台上移植Qt的话,就在配置项中加上 -xplatform linux-arm-gnueabi-g++ ,Qt5支持的交叉平台都可在源码顶层目录中的 /qtbase/mkspecs/ 下找到,每个子目录名代表一个交叉平台的名字,移植Qt时应根据自己的实际情况修改平台对应的子目录下的qmake.conf文件,它定义了一些与平台相关的环境变量,如交叉编译器等;
0 t% R7 X7 ?, ]3 \) h& k, S" }8 H9 V% b0 \: I
最好不要在编译Qt时使能 C++11,一方面你的编译器可能不支持,另一方面使能这一项后可能出现一部分编译错误;
5 k: D6 l( |" M0 z4 \
/ E8 y* c, q' X& Q( j5 d# N& o如果需要openGL,就需要用 -opengl选项指定opengl的api,对于嵌入式平台,一般使用 opengl ES2,配置选项中加入" -opengl es2 " 。不过想使用openGL可能会比较麻烦,因为openGL一般在有硬件图形加速的条件下才能高效运行,而这需要显卡或Soc厂家提供openGL的支持库,但并不是所有Soc都能找到对应的支持库,比如三星就没有提供S5PV210的openGL库,所以我这里编译的Qt也是没有opengl的。(openGL的替代方案:如果没有厂家提供的硬件图形库,可以考虑使用纯软件实现的opengl,这样的软件库有很多是开源的,如mesa3D库等,不过纯软件实现的opengl在效率方面肯定要比带硬件加速的低很多,而且要想在嵌入式平台上使用,必须将opengl的软件库也交叉编译出来,我在交叉编译mesa3D时遇到了些问题,所以目前还没能在开发板上用上openGL);
5 N& K# e# J9 p, i
; ?2 ?& j g0 ]( v2 A, k如果想让Qt程序支持多点触摸,在配置时可能需要加上 -mtdev 和 -xinput2 选项,在help中可以找到这两个选项。mtdev包含了应用程序对多点触摸协议的支持,xinput2实现了Linux的输入子系统对多点触摸的支持。在我这里加上这两个选项的话配置会出错,可能还缺乏一些库,所以最后我没有使用这两个选项;
v. y# }7 ?* c" o3 b
% ~0 I: \- o5 M2 z% S( I另外,Qt5默认的qreal类型是64bit的double,如果希望用float类型定义qreal,则在配置选项中加入"-qreal float"。
+ I8 v% A* N9 d4 n3 ^. a) [1 y
& K w' }/ W0 }5 W; _我的编译过程如下:
' Q6 B7 N! r; C3 `' p8 m' E
0 d! H1 b& | q. |+ I, [7 C首先修改 qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf,内容如下:3 x- i- L+ j6 A
1 k) m2 j. g4 y7 p
[html] view plain copy
, L$ j2 C% J% @# 9 Q2 f1 ? R7 V, l: F# ~: N% ^1 n
# qmake configuration for building with arm-linux-gnueabi-g++ 1 ]7 a. P2 ?' g. z' k
#
) s" T) X3 I+ B' ?) ?: D% D
- _: ?/ A: K! |! C' l9 C& K& bMAKEFILE_GENERATOR = UNIX * B4 T5 K1 f2 C7 k9 P: j. W
CONFIG += incrementar gdb_dwarf_index $ Z+ T& v; b; \- w2 x
QMAKE_INCREMENTAL_STYLE = sublib
, Z, ^# W0 m. o! x( tQT_QPA_DEFAULT_PLATFORM = linux #eglfs
( _' L/ {; A$ C; OQMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
" V8 ~& P- @, @: J R9 n8 A9 iQMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a 1 P( J8 f. R5 T
* \5 R+ O A: v w" a( y
include(../common/linux.conf)
- i9 x" j, Y8 a8 i' W" rinclude(../common/gcc-base-unix.conf)
1 g4 E% [4 Z! y5 Qinclude(../common/g++-unix.conf)
/ [# e+ V Y; C Y! s ! c* d( L7 ^( a2 ?5 K
# modifications to g++.conf
; t% m4 M# j7 B7 lQMAKE_CC = arm-none-linux-gnueabi-gcc
& O" Q! Q# s( r% q m+ dQMAKE_CXX = arm-none-linux-gnueabi-g++ ; W, v- }; V: p: ^& q
QMAKE_LINK = arm-none-linux-gnueabi-g++ * C1 F: _. ^6 @: V1 K H
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
! v% V+ P, Z6 [# ?
: N6 `4 |! ^/ R' X& a# modifications to linux.conf / j o, m# b% `/ {, v+ E
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
: _$ K5 G2 o! f! k8 lQMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
( B$ a. u. o4 ^! {6 w. pQMAKE_NM = arm-none-linux-gnueabi-nm -P
6 L# H( h4 [4 ^# B4 l1 PQMAKE_STRIP = arm-none-linux-gnueabi-strip ( z5 d8 Y2 p- s2 I3 B/ C
load(qt_config) ' g4 B/ H; b( `9 T+ G
7 y* L. `( M, w& F" t% v+ ~" q8 }2 O
然后执行:
! k( t4 x* F: \# K8 c[html] view plain copy1 J' w, Z2 Y7 F) Q
$ ./configure -release -opensource -xplatform linux-arm-gnueabi-g++ -prefix /opt/Qt-5.3.2/armv7-a -no-c++11 -qreal float 5 f5 k G1 y+ Y# R* j% p" O
配置结果为:
- H. H6 z- G9 N( P6 A8 c4 ]
+ d T& K4 [2 [; w* Q% u* b9 s# M[html] view plain copy3 J$ W! ^( y# K+ q; c
Configure summary 4 B1 C9 g* z5 H- s2 z* l6 E3 G
6 d, @- L K8 p3 j: @) Z* d
Building on: linux-g++ (i386, CPU features:)
& s( v# z$ Q- {' ? `2 w( xBuilding for: linux-arm-gnueabi-g++ (arm, CPU features:)
& Y1 d. _) d( a- jPlatform notes: ( f( T n1 ?7 e0 I- K
j4 G+ H( W" M# C- Y/ V
- Also available for Linux: linux-kcc linux-icc linux-cxx ( ?: e/ E. o9 G1 z& {
# ?. M1 X; O& i; m
Build options:
) L! M/ w5 g. h8 I5 a$ W Configuration .......... accessibility alsa audio-backend clock-gettime clock-monotonic compile_examples concurrent cross_compile evdev eventfd freetype full-config getaddrinfo getifaddrs iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-harfbuzz no-pkg-config openssl pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config system-jpeg system-png system-zlib
" _7 y; H/ n* N9 U( v' B" i: {5 Q5 R4 c Build parts ............ libs examples * C& j- F2 I5 p1 p' H
Mode ................... release
4 a! v9 X7 \& N' B% y1 X Using C++11 ............ no ! B' B' k! p2 n$ O. F: p
Using PCH .............. yes
) m# j7 R! p ^ Target compiler supports: $ k2 j: G0 |4 E5 c# i$ D
iWMMXt/Neon .......... no/auto
: F$ ^3 w/ k" j: o* M: A
3 E( w2 v5 v6 j8 J: s1 \- e3 Z/ ]: YQt modules and options: , W! c+ _; c5 y5 r& ]
Qt D-Bus ............... no # W' Y* ?$ [0 D! a
Qt Concurrent .......... yes b* K$ A3 n# A: V* ~; c/ o
Qt GUI ................. yes
k9 A" [6 z" T5 N7 Y1 V Qt Widgets ............. yes . T* [0 G. @6 J7 N
Large File ............. yes
8 ?7 J: @1 J4 ] H! o O4 z6 M QML debugging .......... yes
* B4 A* g( g8 O4 D, u% u+ u Use system proxies ..... no : M$ Q1 N* k% J! \
1 s# Q( U9 l# w
Support enabled for: 2 d' A- ^- D) b2 J7 D
Accessibility .......... yes
# D* |$ [& A4 b( |* t5 _ ALSA ................... yes " n. E+ N* X2 t B& B2 ]
CUPS ................... no
/ ?1 ]: `7 b# |9 U: O6 h4 i Evdev .................. yes 1 d8 X+ c6 c1 w- ~1 v/ [: D2 ^1 K
FontConfig ............. no 6 p' D& V# e$ L7 U
FreeType ............... yes (bundled copy) & r3 i. Y2 J* l3 h6 l* d
Glib ................... no
+ y& O5 l+ i; ^" b, x GTK theme .............. no
+ k% Z9 @7 t9 z: ^) ?4 Y. n8 I HarfBuzz ............... no " Z' f3 z6 v1 j9 Y8 ^
Iconv .................. yes # ?6 U7 q9 `: g0 w$ ?; O
ICU .................... no
9 v7 ]# v- j% O8 b5 u Image formats: 6 m9 h7 L+ |; n9 B' D* U
GIF .................. yes (plugin, using bundled copy) & h- Y( s$ Z" E( v
JPEG ................. yes (plugin, using system library)
% G4 c( O: r4 j& S PNG .................. yes (in QtGui, using system library)
8 L- y3 y, T) x+ \& D9 _) K journald ............... no
' c* i: ]0 f! B. }6 F mtdev .................. no
) Y9 g3 z9 u8 I7 U$ |0 H Networking:
& C, `: J9 c- |; r* c. x$ ]" X getaddrinfo .......... yes
' P5 {; G, K/ ?) s5 C0 ^ getifaddrs ........... yes
2 {. i2 V4 D) R4 ]5 H IPv6 ifname .......... yes
, @/ o/ y& c( }# i; y' d OpenSSL .............. yes (loading libraries at run-time) - o4 F- m: C, T- r
NIS .................... yes ) B4 _+ f+ t' S
OpenGL / OpenVG: 0 O- m8 O5 o" Q1 i9 o
EGL .................. no / W, H% n" V% C( r1 D. K
OpenGL ............... no
o& W& ~" C" f- f OpenVG ............... no % u) R( A7 q- o% [7 P
PCRE ................... yes (bundled copy)
# f' X0 u" O G8 W pkg-config ............. no
0 s8 y# b9 A: a* U2 z8 q PulseAudio ............. no ( q9 A" H! U+ L# q
QPA backends:
) E" H* T: z; {# r. Z& @1 H DirectFB ............. no
/ E/ X' B/ s; c5 ?# j EGLFS ................ no
8 t$ @5 [8 B6 {( r* i- k5 E3 E KMS .................. no 0 m( V% s& V. X* a; v* y0 ?9 e
LinuxFB .............. yes
9 p4 P5 X, e8 A XCB .................. no
& ]$ E# G) J- p$ e* u( G4 {' v: d U Session management ..... yes
6 t! z' G/ Z3 h9 w, ^- B SQL drivers: 2 K5 _3 i3 p9 U
DB2 .................. no
9 X$ s- R! _" J" X4 N. V InterBase ............ no
: \6 }- y( x9 @# n/ W0 u. l3 X4 ] MySQL ................ no ! I1 {: u6 v( ~9 H( e' T
OCI .................. no ) ]5 Q0 J' K+ L0 h( b
ODBC ................. no
) H9 r/ \ M# K4 v PostgreSQL ........... no ' Y& g: r9 _9 F) }0 [; [- A
SQLite 2 ............. no
& m0 b) Z- D9 x" ^ SQLite ............... yes (plugin, using bundled copy) ( U4 M; N+ t# R9 n3 p- d2 I
TDS .................. no 7 M3 H- {" G7 [1 ^# m& c
udev ................... no ; I! H# p3 \; O& U; y! n/ ~8 z
xkbcommon .............. no
- {1 D/ R& H$ H. ?% `: D& y$ K zlib ................... yes (system library)
* D$ k7 ~& a U! e A, \/ T; S, n/ `
- F# B0 N8 p. G' C6 u, {! {9 {1 s% a
配置完成后执行:
9 R9 o% M( O( K: D2 m/ N[html] view plain copy
% `" g9 L0 t# k$ make -j4 9 p0 s$ z1 n, a9 ?
$ sudo make install -j4
3 ]# O: j0 Y5 B; F5 }& v; \: F" o8 D j5 N% O( B! m
3 添加 tslib 支持
4 E7 r- r! K, k9 o: e为了使单点触摸屏可用,还需要编译Qt的tslib插件,这需要首先交叉编译好tslib,tslib的编译过程参见:; r' d! _, L: Y1 i) x# @7 L
+ \$ h9 _6 A* J! V6 @1 f; U; y; Thttp://blog.csdn.net/newthinker_wei/article/details/8639276/ y0 }, D' Y' I" s
友善之臂的板子使用了 touchscreen-1wire,这需要按照上文中的步骤对tslib的源码打上补丁(在tslib的源码中添加了一个一线触摸屏的插件)。非友善之臂的板子一般不用打补丁。0 i, C$ ?+ q8 O" z g7 j1 e8 `4 ^0 |
( X) j7 F$ }9 V; Z另一个有用的链接在这儿,这是友善专门为tslib做的一线触摸屏的插件,有源码,上面那篇文章应该也是参考这个源码的:; ?2 f* l) e8 T& v Z: K, i
* m* n; J( L: ~1 Ahttp://www.arm9home.net/read.php?tid-16105.html Q, o j8 Y! k
. @ h# P9 X7 e/ t: u注意,对于友善之臂的开发板,如果使用的是单点电阻触摸屏,使用上面的方式移植tslib就可以了。但是对于多点的电容触摸屏,上面的两个网址给出的源码都不适用了,友善的多点触摸屏使用的是goodix公司出的触摸屏,goodix驱动的接口跟友善之前用的触摸屏不一样。因此如果想使用tslib,需要再单独为goodix写个TSLIB插件。tslib源码的plugins目录中就是各个插件的代码,可以参考一下他们,都很简单(主要是实现一个read函数)。但要自己写电容屏的插件貌似比较困难,因为要对驱动程序中多点触摸的数据协议有所了解,这样才能从电容屏的数据中提取出单点数据。友善提供了friendlyarm-ts-mtinput.so 文件(但并没有源码),该文件就在友善自带的tslib中,默认目录为/usr/lib/ts/friendlyarm-ts-mtinput.so。把这个库拷贝到自己编译的tslib插件目录中,再修改配置文件ts.conf,即可使tslib工作。
, F) B `$ Z, |/ [& b6 i. Y将编译出来的tslib拷贝到库开发板后,还需要在板子上设置TSLIB的环境变量,主要的几个变量如下:1 M) V/ t5 ^2 w; i+ o; c
% ?: w3 S( k, P; i% p3 k- ~5 q
[html] view plain copy- h& W5 K4 K1 R) o4 ? x: U
#! /bin/sh
1 Z% y/ b$ k0 s% f# "source" this file when wanna run a Qt application on the ARM Board.
+ t0 B1 \$ y6 Z- {$ K 5 m9 k. s F/ O
############### the below lines are for stardard TSLIB ################## ) g, ^9 ]* S. W: _
export TSLIB_ROOT=/opt/tslib
; E& \/ @2 G) Y) U5 {8 C" `! ]2 r$ K* J1 ]export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal
+ [ U4 N% g: K' s' q3 Y/ S; ^$ Gexport TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf 6 c9 s h5 F4 R: ~ g" |9 z
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts 5 d! o/ T4 A# S: ^% [3 P: w
export TSLIB_TSDEVICE=/dev/touchscreen-1wire 3 L+ z4 s: q( K+ G2 j
#export TSLIB_TSDEVICE=/dev/input/event2 - \- h% G$ b$ v+ z
4 e- u7 a3 u- d6 u" J/ c################ the below lines are optional ############## y9 R* |( r# S# j
#export TSLIB_FBDEVICE=/dev/fb0 7 g3 ?* c8 U7 o$ D
#export TSLIB_CONSOLEDEVICE=none
% U8 w; f, n) F8 d* D: a6 C8 y1 `* ^
此外还要修改 ts.conf文件:
! `: k _: t, b2 `: X0 A( L[html] view plain copy
! m( f2 ?& v. p+ J, h9 e1 z Q; ^#module_raw one_wire_ts_input 7 _4 T+ ~' ~4 [( U( ?. a+ U' q
module_raw friendlyarm-ts-mtinput #使用友善提供的电容屏TSLIB插件。需要先将friendlyarm-ts-mtinput.so拷贝到TSLIB_PLUGINDIR目录中
2 x5 D' a+ ~' I; f : _' U8 u7 E [! Q& L4 H3 J$ d
module pthres pmin=1 7 P7 A+ o1 f3 j( U
module variance delta=30 , S1 k. v, Q Q
module dejitter delta=100 8 q9 b1 [! \4 S% Q7 W" S" I
module linear 0 P3 s" D# ^$ Q/ s# @/ k
到此为止 tslib 就基本能用了,首次使用时应先运行 ts_calibrate 进行触摸屏校准。我用的这个版本的tslib自带的ts_calibrate程序不太好用,所以我依然使用友善提供的ts_calibrate进行校准。
; [1 P! Q% p& U. m8 T/ B) I有了tslib后,进入Qt源码目录中的 "qtbase/src/plugins/generic/tslib/",运行 qmake 生成 Makefile,并在Makefile中将tslib的头文件和库文件路径添加到编译链接选项中(-I /...tslib/include -L/.../tslib/lib);然后运行 make 和 make install即可。这时,Qt5安装目录的 "plugins/generic/"目录下就出现"libqtslibplugin.so"这个库文件了。% J# k9 G a5 [1 H
) H, O( d; T/ W* ~9 s2 Y6 ^! W. w4 运行Qt程序
/ B& Y' y( U O3 u0 {需要说明的是,Qt5.0开始,Qt自身不再单独实现窗口系统,QWS不复存在,取而代之的新机制是QPA(Qt平台抽象),QPA使得Qt对不同平台的支持变得更加灵活,当需要支持一个新平台时,只需为该平台编写一个QPA插件。! W$ f$ V& z& V% U& v0 A# X/ k! M+ I
; S$ J& C, B5 o7 e" }; S% C: h
With the release of Qt 5.0, Qt no longer contains its own window system implementation: QWS is no longer a supported platform. For single-process use cases, theQt Platform Abstraction is a superior solution......参考 http://qt-project.org/doc/qt-5/embedded-linux.html
+ y: j9 ?6 y) |/ H% B4 I
0 x; I7 ?4 J$ R, O; V编译完Qt后,只需将生成的lib和plugins文件夹拷贝到开发板,另外,当在嵌入式Linux平台上运行应用程序前,应根据自己平台的实际情况提前设置好下面几个环境变量:6 s. s3 q0 G( O
7 ]& }+ i, H: d; s5 W& e D' t
[html] view plain copy
n5 E3 G! v% B; P2 d+ N/ ~export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/Qt-5.3.2/armv7-a/plugins/platforms 5 ? g1 i/ a) @; @3 W
export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 & C6 |: g& S' \( I
export QT_QPA_FONTDIR=/opt/Qt-5.3.2/armv7-a/lib/fonts # _0 S0 j. T- Y, Z* C- f6 J
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/touchscreen-1wire #使用tslib插件
% d1 C! {4 B9 S5 ~3 f/ U3 _7 ?# c" O% ?- T0 }: j, G S# o8 d5 }1 `
然后就可以运行Qt程序了* U K. m% O% Z9 @% ~) S
# V! P$ f6 V8 a' V6 K
以前Qt4的程序在嵌入式Linux平台运行时,需要在命令行输入-qws选项以启动Qt窗口系统服务,如" ./HelloWorld -qws";而使用Qt5后,不再需要-qws,而需要通过-platform来指定要使用的QPA插件,如" ./HelloWorld -platform linuxfb",如果不指定,则用默认的QPA插件,默认的QPA插件通过上面的QT_QPA_PLATFORM变量指定。
5 M1 O3 n1 n. l( T q1 M. a/ e6 W8 K
附: 在Ubuntu 14.04上编译Qt ---(请注意,本小节编译的是PC版Qt,不是ARM版,ARM版Qt的编译过程请参考本文第2节)4 B# F/ ]* c4 j5 ?9 X9 j! F
在Ubuntu 14.04上编译Qt就简单多了,缺少的组件可以很容易下载到。 i9 Q6 i2 A4 s$ K; R( R+ v" o6 }$ f: H
- }3 Y; m) S& ]; ~" p2 i
首先安装opengl支持(mesa3d),4 R4 V' g% ]7 i
) C. ]) c" M4 A6 f) Q; M- u
[html] view plain copy
6 G/ S/ a2 d1 X- B0 hsudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
2 Z- N8 ]9 {. u! j4 ]% Y如果需要,再安装Qt D-Bus的支持。" z% p. m" J; L0 v. l( h( i
2 e U2 s9 c' P' O8 z' A
然后configure,configure过程中可能出现一些错误,基本都是缺少某个库引起的,配置过程中根据错误提示,用apt-get install或Ubuntu Software Center搜索安装缺少的组件。, s4 K' t1 y) e6 p0 @/ }: Y
+ j; k/ T; p& ]9 ^8 b
[html] view plain copy/ y0 o% `4 T8 r5 q4 t" }/ L5 `
./configure -release -opensource -prefix /opt/Qt-5.3.2/x86 -no-c++11 -qreal float -opengl
. R! ]" o( G: a% _- F6 ~4 K配置结果为: u5 U* s) ?& G! R8 |8 P
' H$ W9 J! p/ N[html] view plain copy
; L! w, C7 w! B5 l Configure summary : z# S4 }. I- Z* t
4 q( U- Z8 w+ j# J& uBuild type: linux-g++ (i386, CPU features:)
# ^! U8 @5 }8 e5 f% a; [* EPlatform notes: : O. b, |, n' y8 Q
' e& `: D2 W) q& }1 s9 T: h u - Also available for Linux: linux-kcc linux-icc linux-cxx
3 B0 C" n' V, L# M# k j* `. Z( t7 y Y
Build options: : g( c; D1 p/ P3 G: R5 }
Configuration .......... accessibility accessibility-atspi-bridge audio-backend avx avx2 clock-gettime clock-monotonic compile_examples concurrent dbus evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl pcre png posix_fallocate precompile_header qpa qpa reduce_exports reduce_relocations release rpath shared small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-jpeg system-png system-zlib xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender $ q0 ^ W3 `2 ^) D1 W5 o* h
Build parts ............ libs tools examples
+ Z, v' l1 g+ S" h4 ~! Q. e" b Mode ................... release ; W' ~ L' w% K$ M. }; F- p% [1 H
Using C++11 ............ no
8 Q( n1 x* c2 M3 c1 m) e, R/ w2 ` Using PCH .............. yes
3 k; Q. ?; p" s' a$ j Target compiler supports:
$ N0 b; F; {8 x SSE2/SSE3/SSSE3 ...... yes/yes/yes , Z; N9 ]! V3 u! l
SSE4.1/SSE4.2 ........ yes/yes
- X4 h3 m+ t+ X: y3 B' I1 F AVX/AVX2 ............. yes/yes
% K) o* b5 L9 w$ R: R* k4 U0 H% m 6 |4 c8 g# k: V
Qt modules and options:
& ~% F! @4 o+ p: [+ U2 m( [5 y Qt D-Bus ............... yes (loading dbus-1 at runtime)
8 d& l% N" v- [ v* ` Qt Concurrent .......... yes
. N/ r5 y7 O, L% n( o& Z Qt GUI ................. yes ' j- V$ Q& u5 l z
Qt Widgets ............. yes 1 f; u2 c3 O8 u
Large File ............. yes & G! Z1 L: u/ l# x' D8 f
QML debugging .......... yes
: p* L5 f1 E/ p* w$ I& y Use system proxies ..... no
) l3 o+ W8 d$ s }/ B
) C+ i, C) z/ ]: k/ cSupport enabled for:
3 W: v$ o. k# s Accessibility .......... yes
/ G: E; {' y2 H- N1 V ALSA ................... no % ]! b# ~* L; |; N3 ^# E6 |
CUPS ................... no + [+ s8 ^* }% M. q& d: a' A
Evdev .................. yes
" Q$ s( q2 X1 F6 E+ U" d1 Q5 F FontConfig ............. yes 4 P. }' t8 q4 A1 I: u
FreeType ............... yes (system library) E# D1 r: K! B- ?
Glib ................... yes " p2 N6 m6 G. c. R; z5 T
GTK theme .............. no % r7 h h5 h! i7 Y' ?0 S* s$ {& X8 S; b
HarfBuzz ............... no 0 M J; ~+ W3 u8 B, Q4 g
Iconv .................. yes
5 r# k. z/ n$ q! |' o0 Q6 |0 { ICU .................... no
3 V! G5 ~5 ~' b6 I- D: W+ t! C Image formats:
4 g; @" |. A( I# p' p! r GIF .................. yes (plugin, using bundled copy)
! b% I% t6 [- Y4 g1 z JPEG ................. yes (plugin, using system library)
! A! v* d7 T. T6 T) L; ? PNG .................. yes (in QtGui, using system library)
5 j" O" O, ]2 f% m8 g journald ............... no
& d8 R, w. z, {8 V) C# |% c mtdev .................. no : c. i: ~4 ]4 a3 H# g
Networking: 3 G2 |! ]8 c' t- r/ Q9 r
getaddrinfo .......... yes
q0 U2 E# {, o getifaddrs ........... yes - ]8 [4 J6 h2 A2 Q
IPv6 ifname .......... yes
! z: S: X6 L3 [6 N+ B OpenSSL .............. no
. r! j% h5 o3 u# g NIS .................... yes 4 A: w1 B: o. s3 d( Y6 H
OpenGL / OpenVG:
7 U' X# b: X8 o/ y% s EGL .................. no ! D$ J6 R- ?7 \; i9 L) g1 ]
OpenGL ............... desktop
2 Y+ C( h5 |5 e; m6 H OpenVG ............... no
) t* d: x1 _' V5 Q6 H; j$ X PCRE ................... yes (bundled copy) ' F' G9 G+ W- C9 N7 O% \! g; q
pkg-config ............. yes
& |0 B! b% A5 G+ r. R- U; e PulseAudio ............. no
# ~# o" M2 M5 r+ E! i% ]# [ QPA backends:
& {; {# O5 }! D$ C DirectFB ............. no % w. W' T) Z4 K) b' ]
EGLFS ................ no . U1 J' a. c; v2 r3 o) g6 ^
KMS .................. no
% C% R T6 I8 E/ S0 C9 I LinuxFB .............. yes # u! o$ e" N1 }9 }7 }0 p$ N' X
XCB .................. yes (system library) ! u+ E- m7 O% V9 Q% q0 G
EGL on X ........... no
/ J4 ] d/ H i; s4 t7 U. p GLX ................ yes 6 A/ n) g. K! _: ]
MIT-SHM ............ yes
; m: @# ?4 K- m1 u1 l* g Xcb-Xlib ........... yes 1 e# {2 n; X+ l" q$ w
Xcursor ............ yes (loaded at runtime)
* l9 F5 [" A5 r& _! n- o! U Xfixes ............. yes (loaded at runtime) 3 C# r4 u( g1 l6 I
Xi ................. no 7 N' I0 T4 V% M* ]% t
Xi2 ................ yes ; |2 z: ~6 }* a! c& Y
Xinerama ........... yes (loaded at runtime) : Y2 l5 F% V$ z- R/ ~' F( b, T
Xrandr ............. yes (loaded at runtime)
) I" J6 F7 @8 G7 }9 e" F Xrender ............ yes
W! X2 @' U" B# t- } XKB ................ no $ m/ ]6 F% p2 x# U/ R
XShape ............. yes * @# ?/ e7 p' ~9 N7 C# A
XSync .............. yes
0 V( I- |8 \" [$ W' E XVideo ............. yes
* U+ j. X; w* ^9 O/ b( F! [ Session management ..... yes
5 a+ w4 }: u |2 I3 k SQL drivers: & W0 i2 n6 z/ Z6 r' ~5 [
DB2 .................. no
4 d! \ i. R" `' M InterBase ............ no
5 t6 Z) ?, X' ?0 V5 Q9 H0 H MySQL ................ no
' \5 M7 j& F6 h) k3 B OCI .................. no
& k+ h" d5 C3 {7 ?$ u ODBC ................. no 2 z0 I# ]! M) b. Z
PostgreSQL ........... no 5 A& E9 b6 e( z" V1 n
SQLite 2 ............. no & X6 X; J& j5 K- m; w1 Q8 O0 H9 J0 T
SQLite ............... yes (plugin, using bundled copy)
$ X0 `: Q# M% m8 N! A: } TDS .................. no & l2 W, w. n9 R! S
udev ................... yes 6 J& \* o6 H% c& W- i u6 \
xkbcommon .............. yes (bundled copy, XKB config root: /usr/share/X11/xkb)
2 B- X9 p, [1 ` e1 |5 D4 v& G1 i zlib ................... yes (system library) 4 h2 R% A; m: F6 [
( P5 u, h: x$ q; g1 i
NOTE: libxkbcommon and libxkbcommon-x11 0.4.1 or higher not found on the system, will use
2 S6 n; B) B, ]/ }; \# F! Rthe bundled version from 3rd party directory. 3 w4 d6 x+ `% e2 g7 k
1 a4 C2 @* K* e
最后make和make install即可。
; f, [, f% j8 r: D+ T5 h% i: K: [: e
7 z+ k" E7 l( F3 p* V
另外,编译完Qt5.3.2后,发现Qt assistant打开之后内容是空的,查询不到任何东西。需要打开assistant,点击Edit->preference菜单,选择Documents选项卡,点击add向assistant添加文档,文档类型为 *.qch 。但Qt5中似乎文档并不是现成的,需要在编译完Qt后再去编译他的文档。步骤为:, K! F5 I2 `6 q5 D9 N& O* p
6 Z) r" C* L# J. d7 Y4 F5 {
进入已经编译过的Qt源码顶层目录,输入
4 F' U7 P9 n+ X[html] view plain copy
( T0 c4 R2 v7 W6 a" j* Y$ make docs
V. t/ H: B M8 ^2 n8 ?这条指令会生成Qt各个模块的文档,但这些文档分散于不同的子源码目录中,最好将他们集中拷贝出来放到Qt的安装目录中,我的做法如下,当执行完make docs后,在源码顶层目录输入:(/opt/Qt-5.3.2是我的安装目录)1 {0 m" j+ ]' l2 q1 k6 V
[html] view plain copy
3 M8 h, m, m I4 ~+ m$ sudo mkdir /opt/Qt-5.3.2/docs_for_assistant
' g- `6 H; F5 ~) _0 f$ sudo cp `find ./ -name *.qch` /opt/Qt-5.3.2/docs_for_assistant & j3 `" \0 K& W: w9 q5 [: e
然后打开assistant,将 /opt/Qt-5.3.2/docs_for_assistant 目录中的*.qch文件全部add进去。 |
|