【Qt】Qt5.8交叉编译配置选项详解(./configure --help)

Usage:  configure [options] [assignments]


Configure understands variable assignments like VAR=value on the command line.
These override any values possibly obtained from pkg-config. The variables
are mentioned in the descriptions of the options they relate to.


It is also possible to manipulate any QMAKE_* variable, to amend the values
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
在命令行配置变量,如var=值。这将覆盖从pkg-config获得的变量值
也可以在mkspec中通过操作qmake_*变量来构建Qt应用程序,例如,qmake_cxxflags += - G3。


顶级安装目录:
Top-level installation directories:
  -prefix ...... The deployment directory, as seen on the target device.
                       [/usr/local/Qt-$QT_VERSION, $PWD if -developer-build]
部署目录,在目标设备上看到的。
  -extprefix ... The installation directory, as seen on the host machine.
                       [SYSROOT/PREFIX]
安装目录,在主机上看到的
  -hostprefix [dir] .. The installation directory for build tools running on
                       the host machine. If [dir] is not given, the current
                       build directory will be used. [EXTPREFIX]
安装目录:在主机上正在编译的生成工具的安装目录。如果未给出,则为当前目录
  -external-hostbindir ... Path to Qt tools built for this machine.
                       Use this when -platform does not match the current
                       system, i.e., to make a Canadian Cross Build.
为该机器构建的Qt工具路径,当-platform与当前系统不匹配时使用此选项,如交叉编译???
Fine tuning of installation directory layout. Note that all directories
except -sysconfdir should be located under -prefix/-hostprefix:
安装目录布局的微调。请注意,所有目录除sysconfdir应位于在-prefix/-hostprefix指定的目录下面:
  -bindir ......... Executables [PREFIX/bin]可执行文件路径
  -headerdir ...... Header files [PREFIX/include]头文件路径
  -libdir ......... Libraries [PREFIX/lib]库文件路径
  -archdatadir .... Arch-dependent data [PREFIX]依赖平台数据
  -plugindir ...... Plugins [ARCHDATADIR/plugins]插件路径
  -libexecdir ..... Helper programs [ARCHDATADIR/bin on Windows,
                          ARCHDATADIR/libexec otherwise]
辅助程序(外部调用程序???)
  -importdir ...... QML1 imports [ARCHDATADIR/imports]QML1入口
  -qmldir ......... QML2 imports [ARCHDATADIR/qml]QML2入口
  -datadir ........ Arch-independent data [PREFIX]独立的平台数据
  -docdir ......... Documentation [DATADIR/doc]文档
  -translationdir . Translations [DATADIR/translations]翻译
  -sysconfdir ..... Settings used by Qt programs [PREFIX/etc/xdg]Qt程序配置目录
  -examplesdir .... Examples [PREFIX/examples]例子目录
  -testsdir ....... Tests [PREFIX/tests]测试目录


  -hostbindir ..... Host executables [HOSTPREFIX/bin]主机可执行程序目录
  -hostlibdir ..... Host libraries [HOSTPREFIX/lib]主机库目录
  -hostdatadir .... Data used by qmake [HOSTPREFIX]qmake使用的数据目录


Conventions for the remaining options: When an option's description is
followed by a list of values in brackets, the interpretation is as follows:
'yes' represents the bare option; all other values are possible prefixes to
the option, e.g., -no-gui. Alternatively, the value can be assigned, e.g.,
--gui=yes. Values are listed in the order they are tried if not specified;
'auto' is a shorthand for 'yes/no'. Solitary 'yes' and 'no' represent binary
options without auto-detection.
选项的约定:括号中的值,解释如下:
(以"-libpng... Select used libpng [system/qt/no]"为例)
1)"yes"不用明确指出(-libpng),括号中其他的值可以作为前缀,如"-qt-libpng";
2)也可以用--libpng=qt的格式来表示
3)"auto"是"yes"和"no"的简写,代表[yes/no]
4)只出现"yes"或"no",说明该选项不能自动检查,裁剪时要特别留意


Configure meta:
元配置
  -help, -h ............ Display this help screen显示帮助
  -verbose, -v ......... Print verbose messages during configuration打印详细配置信息
  -continue ............ Continue configure despite errors尽管有错,但继续配置
  -redo ................ Re-configure with previously used options.
                         Additional options may be passed, but will not be
                         saved for later use by -redo.
使用以前的选项重新配置,可以添加附加选项,但不会保持
  -recheck ............. Discard cached negative configure test results.
                         Use this after installing missing dependencies.
测试配置结果;当安装依赖缺失是,使用该选项
  -recheck-all ......... Discard all cached configure test results.
测试配置结果


Build options:
编译选项:
  -opensource .......... Build the Open-Source Edition of Qt:创建开源版本的Qt
  -commercial .......... Build the Commercial Edition of Qt:创建商业版本的Qt
  -confirm-license ..... Automatically acknowledge the license
自动确认许可


  -release ............. Build Qt with debugging turned off [yes]
发行版本
  -debug ............... Build Qt with debugging turned on [no]
调试版本
  -debug-and-release ... Build two versions of Qt, with and without
                         debugging turned on [yes] (Apple and Windows only)
创建发行和编译版本(只有苹果和windows系统支持)
  -optimized-tools ..... Build optimized host tools even in debug build [no]
即使在调试版本中也进行优化
  -force-debug-info .... Create symbol files for release builds [no]
为发行版本创建符号文件
  -separate-debug-info . Split off debug information to separate files [no]
将调试信息分离到文件中
  -strip ............... Strip release binaries of unneeded symbols [yes]
发行版:将不必要的符号表剔除,
  -force-asserts ....... Enable Q_ASSERT even in release builds [no]
即使在发行版本中也使能断言
  -developer-build ..... Compile and link Qt for developing Qt itself
                         (exports for auto-tests, extra checks, etc.) [no]
编译和链接qt本身
  -shared .............. Build shared Qt libraries [yes] (no for UIKit)
创建共享库
  -static .............. Build static Qt libraries [no] (yes for UIKit)
创建静态库
  -framework ........... Build Qt framework bundles [yes] (Apple only)
构建Qt框架捆绑(只在苹果系统中)
  -platform ... Select host mkspec [detected]
选择主机中mkspec目录下的相应配置
  -host-option ..... Add option for the host mkspec
添加主机mkspec选项
  -xplatform .. Select target mkspec when cross-compiling [PLATFORM]
交叉编译时选目标板的mkspec
  -device ....... Cross-compile for device
制定设备的交叉编译
  -device-option ... Add option for the device mkspec
添加设备的mkspec选项
  -qtnamespace .. Wrap all Qt library code in 'namespace {...}'.
在“命名空间<名称> {…}”中封装所有Qt库代码。
  -qtlibinfix .. Rename all libQt5*.so to libQt5*.so.
重命名所有libqt5 *,格式如libQt5*.so。
  -testcocoon .......... Instrument with the TestCocoon code coverage tool [no]
testcocoon代码覆盖工具
  -gcov ................ Instrument with the GCov code coverage tool [no]
GCov代码覆盖工具
  -sanitize {address|thread|memory|undefined}
                         Instrument with the specified compiler sanitizer.
使用特定的编译器检查(地址|线程|寄存器|未定义)错误
  -c++std .... Select C++ standard [c++1z/c++14/c++11]
                         (Not supported with MSVC)
选择++C标准版本
  -rtti ................ Build with Runtime Type Information [yes] (MSVC only)
创建运行时类型信息
  -sse2 ................ Use SSE2 instructions [auto]
使用SSE2指令
  -sse3/-ssse3/-sse4.1/-sse4.2/-avx/-avx2/-avx512
                         Enable use of particular x86 instructions [auto]
启用特定x86指令的使用
                         Enabled ones are still subject to runtime detection.
启用的仍然受到运行时检测
  -mips_dsp/-mips_dspr2  Use MIPS DSP/rev2 instructions [auto]
使用MIPS DSP 指令
  -qreal ........ typedef qreal to the specified type. [double]
                         Note: this affects binary compatibility.
qreal定义为指定的类型;注意:这会影响二进制兼容性。
  -R .......... Add an explicit runtime library path to the Qt
                         libraries. Supports paths relative to LIBDIR.
向显式添加Qt库运行库路径。支持相对路径
  -rpath ............... Link Qt libraries and executables using the library
                         install path as a runtime library path. Similar to
                         -R LIBDIR. On Apple platforms, disabling this implies
                         using absolute install names (based in LIBDIR) for
                         dynamic libraries and frameworks. [auto]
链接Qt库和可执行文件时,使用库安装路径作为一个运行库路径。类似于-R libdir。在苹果的平台上,这意味着使用绝对禁用安装名称(总部设在LIBDIR)的动态库和框架。
  -reduce-exports ...... Reduce amount of exported symbols [auto]
减少输出符号的数量
  -reduce-relocations .. Reduce amount of relocations [auto] (Unix only)
减少重定位的数量
  -plugin-manifests .... Embed manifests into plugins [no] (Windows only)
嵌入的插件
  -static-runtime ...... With -static, use static runtime [no] (Windows only)
与-static一同使用,在静态运行时
  -pch ................. Use precompiled headers [auto]
使用预编译头文件
  -ltcg ................ Use Link Time Code Generation [no]
使用链接时间代码生成
  -use-gold-linker ..... Use the GNU gold linker [auto]
使用GUN全局链接器
  -incredibuild-xge .... Use the IncrediBuild XGE [no] (Windows only)
  -make-tool .... Use to build qmake [nmake] (Windows only)
使用tool去创建qmake
  -mp .................. Use multiple processors for compilation (MSVC only)
使用多个处理器去编译
  -warnings-are-errors . Treat warnings as errors [no; yes if -developer-build]
将警告视为错误
  -silent .............. Reduce the build output so that warnings and errors
                         can be seen more easily
减少编译输出,使警告和错误更容易看到
Build environment:
构建环境
  -sysroot ....... Set as the target sysroot
设置为目标的sysroot目录(系统root目录)
  -gcc-sysroot ......... With -sysroot, pass --sysroot to the compiler [yes]
与-sysroot一起使用,将--sysroot传给编译器
  -pkg-config .......... Use pkg-config [auto] (Unix only)


  -D .......... Pass additional preprocessor define
添加预定义
  -I .......... Pass additional include path
添加头文件路径
  -L .......... Pass additional library path
添加库路径
  -F .......... Pass additional framework path (Apple only)
添加框架路径(只在苹果系统上)
  -sdk ........... Build Qt using Apple provided SDK . The argument
                         should be one of the available SDKs as listed by
                         'xcodebuild -showsdks'.
                         Note that the argument applies only to Qt libraries
                         and applications built using the target mkspec - not
                         host tools such as qmake, moc, rcc, etc.
利用苹果建立Qt提供SDK < SDK >。应该是在"xcodebuild - showsdks"上一个可用的SDK。
注意该参数仅适用于使用目标mkspec不是主机工具如qmake,moc,使用目标板的mkspec建成的Qt库和应用程序。
  -android-sdk path .... Set Android SDK root path [$ANDROID_SDK_ROOT]
  -android-ndk path .... Set Android NDK root path [$ANDROID_NDK_ROOT]
  -android-ndk-platform  Set Android platform
  -android-ndk-host .... Set Android NDK host (linux-x86, linux-x86_64, etc.)
                         [$ANDROID_NDK_HOST]
  -android-arch ........ Set Android architecture (armeabi, armeabi-v7a,
                         arm64-v8a, x86, x86_64, mips, mips64)
  -android-toolchain-version ... Set Android toolchain version
  -android-style-assets  Automatically extract style assets from the device at
                         run time. This option makes the Android style behave
                         correctly, but also makes the Android platform plugin
                         incompatible with the LGPL2.1. [yes]
在运行时自动从设备中提取样式资产。此选项会使Android风格的正确的行为,也使得Android平台的lgpl2.1插件不兼容。


Component selection:
组成选项(裁剪)
  -skip ......... Exclude an entire repository from the build.
整个库都不包含(由自己去逐个添加???)。
  -make ......... Add to the list of parts to be built.
                         Specifying this option clears the default list first.
                         [libs and examples, also tools if not cross-building,
                         also tests if -developer-build]
添加到要建造的部件列表中。首先清除默认列表,再指定此选项。


  -nomake ....... Exclude from the list of parts to be built.
从要构建的部件列表中排除
  -compile-examples .... When unset, install only the sources of examples [yes]
如果没有设置,将只安装源码中的例子
  -gui ................. Build the Qt GUI module and dependencies [yes]
构建GUI模块和依赖
  -widgets ............. Build the Qt Widgets module and dependencies [yes]
构建widgets模块和依赖
  -no-dbus ............. Do not build the Qt D-Bus module
                         [default on Android and Windows]
不构建D-Bus
  -dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto]
构建D-Bus并与libdbus-1链接
  -dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no]
                         DBUS_PATH= DBUS_HOST_PATH=
构建D-Bus并动态调用libdbus-1库
  -feature- ... Enable . The available features are described
                         in src/corelib/global/qfeatures.txt. [all enabled]
启用<功能>。可用的功能在src/corelib/global/qfeatures.txt中描述
  -accessibility ....... Enable accessibility support [yes]
                         Note: Disabling accessibility is not recommended.
启用可访问性支持;注意:禁用可访问性不推荐
  -qml-debug ........... Enable QML debugging support [yes]
启动QML调试支持
Qt comes with bundled copies of some 3rd party libraries. These are used
by default if auto-detection of the respective system library fails.
Qt附带捆绑一些第三方库的副本。如果没有在系统库中检测到,将去这些库中查找。


Core options:
核心选项:
  -doubleconversion .... Select used double conversion library [system/qt/no]
                         No implies use of sscanf_l and snprintf_l (imprecise).
双转换的…选择使用双转换库.不意味着使用sscanf_l和snprintf_l???
  -glib ................ Enable Glib support [no; auto on Unix]
使能Glib
  -eventfd ............. Enable eventfd support
使能eventfd;(eventfd:linux系统调用,为事件通知创建文件描述符。)
  -inotify ............. Enable inotify support
使能inotify;监控文件系统操作
  -iconv ............... Enable iconv(3) support [posix/sun/gnu/no] (Unix only)
使能iconv:字符编码转换,国际编码格式间进行文本内码转换 
  -icu ................. Enable ICU support [auto]
使能ICU:用于支持软件国际化的开源项目,根据各地的风俗和语言习惯,实现对数字、货币、时间、日期、和消息的格式化、解析,对字符串进行大小写转换、整理、搜索和排序等功能
  -pps ................. Enable PPS support [auto] (QNX only)
使能PPS:QNX的持久的发布/订阅(PPS)服务
  -pcre ................ Select used libpcre3 [system/qt]
使能pcre;PCRE(Perl Compatible Regular Expressions中文含义:perl语言兼容正则表达式)C语言编写的正则表达式函数库
  -zlib ................ Select used zlib [system/qt]
使能zlib
                         ZLIB_LIBS=


  Logging backends:
  后端日志
    -journald .......... Enable journald support [no] (Unix only)
使能Journald;Journald是为Linux服务器打造的新系统日志方式,它标志着文本日志文件的终结。现在日志信息写入到二进制文件,使用journalctl阅读来获得这些信息.
    -syslog ............ Enable syslog support [no] (Unix only)
使能syslog
    -slog2 ............. Enable slog2 support [auto] (QNX only)
使能slog2;slog2一个高性能的c/c++多线程安全日志库
Network options:
网络选项:


  -ssl ................. Enable either SSL support method [auto]
使能SSL
  -no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
不使用OpenSSL
  -openssl-linked ...... Use OpenSSL and link to libssl [no]
使用OpenSSL,并且链接libssl库,静态使用
  -openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
                         OPENSSL_PATH= OPENSSL_LIBS=, and on Windows also
                         OPENSSL_LIBS_DEBUG= OPENSSL_LIBS_RELEASE=
使用OpenSSL,并且动态加载libssl库
  -securetransport ..... Use SecureTransport [auto] (Apple only)
使用安全传输(只在苹果系统中)
  -sctp ................ Enable SCTP support [no]
使能SCTP;SCTP流量控制传输协议,一个传输层协议,是提供基于不可靠传输业务的协议之上的可靠的数据报传输协议
  -libproxy ............ Enable use of libproxy [no]
使能代理服务器库???
  -system-proxies ...... Use system network proxies by default [yes]
默认使用系统网络代理


Gui, printing, widget options:
GUI,打印,widget选项:


  -cups ................ Enable CUPS support [auto] (Unix only)
使能CUPS:CUPS(Common UNIX Printing System,通用Unix打印系统)
  -fontconfig .......... Enable Fontconfig support [auto] (Unix only)
使能字体管理库
  -freetype ............ Select used FreeType [system/qt/no]
选择freetype;FreeType库是高质量的且可移植的字体引擎,它提供统一的接口来访问多种字体格式文件
  -harfbuzz ............ Select used HarfBuzz-NG [system/qt/no]
                         (Not auto-detected on Apple and Windows)
选择使用HarfBuzz-NG;HarfBuzz-NG:可以用来文字渲染等
  -gtk ................. Enable GTK platform theme support [auto]
使能GTK:GTK+(GIMP Toolkit)是一套源码以LGPL许可协议分发、跨平台的图形工具包。
  -lgmon ............... Enable lgmon support [auto] (QNX only)
QUNIX(Quick UNIX)的系统:QNX是一种商用的遵从POSIX规范的类Unix实时操作系统最成功的微内核操作系统之一


  -no-opengl ........... Disable OpenGL support
禁用OpenGL:开放图形库,提供2D/3D 图形 API
  -opengl ........ Enable OpenGL support. Supported APIs:
                         es2 (default on Windows), desktop (default on Unix),
                         dynamic (Windows only)
使能OpenGL
  -opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto]
OpenGL ES (OpenGL for Embedded Systems) 是 OpenGL 三维图形 API 的子集,针对手机、PDA和游戏主机等嵌入式设备而设计。


  -angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto]
                         (Windows only)
ANGLE原生图形层引擎;OpenGL ES 2.0 API中的Web GL(3D绘图标准)子集接口
  -qpa .......... Select default QPA backend (e.g., xcb, cocoa, windows)
Qt5.0开始,Qt自身不再单独实现窗口系统,QWS不复存在,取而代之的新机制是QPA(Qt平台抽象)
  -xcb-xlib............. Enable Xcb-Xlib support [auto]
Xlib:一个用c语言编写的 X Window System 协议的客户端库
  Platform backends:
  平台的后台
    -direct2d .......... Enable Direct2D support [auto] (Windows only)
Direct2D 是一种硬件加速的即时模式二维图形 API,可为二维几何对象、位图和文本提供高性能、高质量的呈现。
    -directfb .......... Enable DirectFB support [no] (Unix only)
DirectFB的目的是提供硬件图形加速,目标是提供高级图形运算包括多层alpha,具有矩形三角形填充/绘制的特性。
    -eglfs ............. Enable EGLFS support [auto; no on Android and Windows]
eglfs是Qt的一个平台插件,使Qt程序可以利用opengl es画图而无需窗口系统. 这种方式是在支持gpu的嵌入式设备主要采用的方式. 一般需要gpu厂商提供egl和gles驱动模块.
Qt可以利用eglfs插件实现直接画图(全屏),或者在有窗口管理系统(如wayland合成器weston或Qtwayland合成器)时,通过窗口画图.前者只能全屏显示一个程序,后者可以实现多进程应用
    -gbm ............... Enable backends for GBM [auto] (Linux only)
    -kms ............... Enable backends for KMS [auto] (Linux only)
KMS 就是内核模式设置???终端和X 图形界面使用相同的分辨率
    -linuxfb ........... Enable Linux Framebuffer support [auto] (Linux only)
qt库如果是使用-linuxFB选项编译出的,他在启动时会读取环境变量QWS_DISPLAY,用这个来指定qws输出到那个fb上去
    -mirclient ......... Enable Mir client support [no] (Linux only)
Mir下一代统一的显示服务器,取代xorg(xorg是X11的一个实现)
    -xcb ............... Select used xcb-* libraries [system/qt/no]
                         (-qt-xcb still uses system version of libxcb itself)
xcb(X protocol C-language BindingX协议的C语言结合)
  Input backends:
  输入的后台
    -evdev ............. Enable evdev support [auto]
使能evdev:输入事件驱动
    -imf ............... Enable IMF support [auto] (QNX only)
    -libinput .......... Enable libinput support [auto]
输入子设备库
    -mtdev ............. Enable mtdev support [auto]
使能多点触控
    -tslib ............. Enable tslib support [auto]
使能触摸屏
    -xinput2 ........... Enable XInput2 support [auto]
使能手柄输入
    -xkbcommon-x11 ..... Select xkbcommon used in combination with xcb
                         [system/qt/no]
xkbcommon是库来处理键盘的描述,包括从磁盘加载,解析和处理他们的状态
    -xkb-config-root ... With -qt-xkbcommon-x11, set default XKB config
                               root [detect]
    -xkbcommon-evdev ... Enable X-less xkbcommon in combination with libinput
                         [auto]


  Image formats:
  图片格式
    -gif ............... Enable reading support for GIF [auto]
    -ico ............... Enable support for ICO [yes]图标文件格式
    -libpng ............ Select used libpng [system/qt/no]
    -libjpeg ........... Select used libjpeg [system/qt/no]


Database options:
数据库支持
  -sql- ........ Enable SQL plugin. Supported drivers:
                         db2 ibase mysql oci odbc psql sqlite2 sqlite tds
                         [all auto]
                         MYSQL_PATH= PSQL_LIBS= SYBASE= SYBASE_LIBS=
  -sqlite .............. Select used sqlite3 [system/qt]

你可能感兴趣的:(Qt,中文手册,Qt)