[Qt配置指南—1]Qt 5.4.2 Configure Options---Qt配置选项介绍
2017-01-03 13:15
337 查看
如有错误,欢迎批评指正!!!
为了更好的在ARM平台上开发Qt程序,往往需要定制编译Qt开发套件,以满足需求与限制的平衡,在使用容量较小的ARM平台时这显得尤为重要,本文根据Qt5.4.2进行相关介绍。
详情参考http://doc.qt.io/qt-5/configure-options.html
下文信息翻译自qt-everywhere-opensource-src-5.4.2中configure帮助信息。
-no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler
当使用-sysroot时, 它禁用将–sysroot传递到编译器
-no-feature-<feature> Do not compile in <feature>.在
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt
编译
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default (full).
-qreal [double|float] typedef qreal to the specified type. The default is double.
Note that changing this flag affects binary compatibility.
为qreal指定类型.默认值是double。请注意,更改此标志影响二进制兼容性
-no-opengl .......... Do not support OpenGL.禁用OpenGL支持
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
OpenGL ES 2.0 and higher, or regular desktop OpenGL.
Use es2 for <api> to override auto-detection.
启用 OpenGL 支持.不带参数时,这将会尝试自动检测的 OpenGL ES 2.0 和更高版本,或常规的桌面版OpenGL.
使用 es2 的
* -no-system-proxies .. Do not use system network proxies by default.默认情况下,不使用系统网络代理
-system-proxies ..... Use system network proxies by default.默认情况下,使用系统网络代理
-no-warnings-are-errors Make warnings be treated normally,Make 时把warnings当做正常
-warnings-are-errors Make warnings be treated as errors
(enabled if -developer-build is active)
Make时把warnings 当做错误 (如果启用了-developer-build)
QNX/Blackberry options:
-no-slog2 .......... Do not compile with slog2 support.
-slog2 ............. Compile with slog2 support.
-no-pps ............ Do not compile with pps support.
-pps ............... Compile with pps support.
-no-imf ............ Do not compile with imf support.
-imf ............... Compile with imf support.
-no-lgmon .......... Do not compile with lgmon support.
-lgmon ............. Compile with lgmon support.
MacOS/iOS options:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
-no-framework ...... Do not build Qt as a series of frameworks.
-sdk <sdk> ......... Build Qt using Apple provided SDK <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.
Android options:
-android-sdk path .............. The Android SDK root path.
(default $ANDROID_SDK_ROOT)
-android-ndk path .............. The Android NDK root path.
(default $ANDROID_NDK_ROOT)
-android-ndk-platform .......... Sets the android platform
(default android-9)
-android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.)
(default $ANDROID_NDK_HOST)
-android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips)
(default armeabi-v7a)
-android-toolchain-version ..... Sets the android toolchain version
(default 4.8)
-no-android-style-assets ....... Do not compile in the code which automatically extracts
style assets from the run-time device. Setting this will
make the Android style behave incorrectly, but will enable
compatibility with the LGPL2.1 license.
* -android-style-assets ....
b27a
...... Compile the code which automatically extracts style assets
from the run-time device. This option will make the
Android platform plugin incompatible with the LGPL2.1.
[/code]
为了更好的在ARM平台上开发Qt程序,往往需要定制编译Qt开发套件,以满足需求与限制的平衡,在使用容量较小的ARM平台时这显得尤为重要,本文根据Qt5.4.2进行相关介绍。
详情参考http://doc.qt.io/qt-5/configure-options.html
下文信息翻译自qt-everywhere-opensource-src-5.4.2中configure帮助信息。
Usage: configure [options] Installation options: These are optional, but you may specify install directories. -prefix <dir> ...... This will install everything relative to <dir> (default /usr/local/Qt-5.4.2, $PWD if -developer-build is active) 指定安装目录,默认安装目录/usr/local/Qt-5.4.2 -extprefix <dir> ... When -sysroot is used, install everything to <dir>, rather than into SYSROOT/PREFIX. 当-sysroot被使用时,被安装进<dir>目录而不是SYSROOT/PREFIX -hostprefix [dir] .. Tools and libraries needed when developing applications are installed in [dir]. If [dir] is not given, the current build directory will be used. (default EXTPREFIX) You may use these to separate different parts of the install: -bindir <dir> ......... User executables will be installed to <dir>,用户可执行文件安装目录 (default PREFIX/bin) -headerdir <dir> ...... Headers will be installed to <dir>,头文件安装目录 (default PREFIX/include) -libdir <dir> ......... Libraries will be installed to <dir>,库文件安装目录 (default PREFIX/lib) -archdatadir <dir> .... Arch-dependent data used by Qt will be installed to <dir>,Qt依赖的体系结构数据目录 (default PREFIX) -plugindir <dir> ...... Plugins will be installed to <dir>,Plugin安装目录 (default ARCHDATADIR/plugins) -libexecdir <dir> ..... Program executables will be installed to <dir>,程序可执行文件安装目录 (default ARCHDATADIR/libexec, ARCHDATADIR/bin for MinGW) -importdir <dir> ...... Imports for QML1 will be installed to <dir>,QML1安装目录 (default ARCHDATADIR/imports) -qmldir <dir> ......... Imports for QML2 will be installed to <dir>,QML2安装目录 (default ARCHDATADIR/qml) -datadir <dir> ........ Arch-independent data used by Qt will be installed to <dir>,不依赖于体系结构数据目录 (default PREFIX) -docdir <dir> ......... Documentation will be installed to <dir>,文档安装目录 (default DATADIR/doc) -translationdir <dir> . Translations of Qt programs will be installed to <dir>,Qt程序的translation安装目录 (default DATADIR/translations) -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>, Qt程序设置查找目录 (default PREFIX/etc/xdg) -examplesdir <dir> .... Examples will be installed to <dir>, 例程安装目录 (default PREFIX/examples) -testsdir <dir> ....... Tests will be installed to <dir>, 测试用例安装目录 (default PREFIX/tests) -hostbindir <dir> .. Host executables will be installed to <dir>,主机端程序安装目录 (default HOSTPREFIX/bin) -hostlibdir <dir> .. Host libraries will be installed to <dir>,主机端库文件安装目录 (default HOSTPREFIX/lib) -hostdatadir <dir> . Data used by qmake will be installed to <dir>,qmake使用数据目录 (default HOSTPREFIX) Configure options: The defaults (*) are usually acceptable. A plus (+) denotes a default value that needs to be evaluated. If the evaluation succeeds, the feature is included. Here is a short explanation of each option: 默认(*)表示可接受选项,(+)表示该选项需要被评估,如果评估成功,则该特性可以被包括。 * -release ........... Compile and link Qt with debugging turned off. -debug ............. Compile and link Qt with debugging turned on. -debug-and-release . Compile and link two versions of Qt, with and without debugging turned on (Mac only). 编译的版本,根据需求改变。 -force-debug-info .. Create symbol files for release builds.强制为release构建输出调试信息 -developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting).Qt开发者编译和链接选项(包括自动测试/输出) -opensource ........ Compile and link the Open-Source Edition of Qt.编译和链接Qt开源版本 -commercial ........ Compile and link the Commercial Edition of Qt.编译和链接的Qt商业版 -confirm-license ... Automatically acknowledge the license (use with either -opensource or -commercial),自动确认许可证(使用开源或是商业) -no-c++11 .......... Do not compile Qt with C++11 support enabled. + -c++11 ............. Compile Qt with C++11 support enabled. * -shared ............ Create and use shared Qt libraries.创建并使用Qt共享库 -static ............ Create and use static Qt libraries.创建并使用QT静态库 -no-largefile ...... Disables large file support.禁用大文件支持 + -largefile ......... Enables Qt to access files larger than 4 GB.启用QT访问大于4 GB的文件功能 -no-accessibility .. Do not compile Accessibility support. Disabling accessibility is not recommended, as it will break QStyle and may break other internal parts of Qt. With this switch you create a source incompatible version of Qt, which is unsupported. + -accessibility ..... Compile Accessibility support. -no-sql-<driver> ... Disable SQL <driver> entirely.完全禁用SQL <driver> -qt-sql-<driver> ... Enable a SQL <driver> in the Qt SQL module, by default none are turned on.在 Qt SQL 模块启用SQL <driver>,默认是不启用的 -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to at run time.启用SQL <driver\>作为一个插件在运行时链接 Possible values for <driver>: [ db2 ibase mysql oci odbc psql sqlite sqlite2 tds ] -system-sqlite ..... Use sqlite from the operating system.利用操作系统SQLite -no-qml-debug ...... Do not build the in-process QML debugging support.不构建在QML调试支持 + -qml-debug ......... Build the QML debugging support.构建QML调试支持 -platform target ... The operating system and compiler you are building on (default detected from host system). 构建的目标操作系统和编译器(默认检测主机系统) See the README file for a list of supported operating systems and compilers. -no-sse2 ........... Do not compile with use of SSE2 instructions.编译不要使用SSE2指令 -no-sse3 ........... Do not compile with use of SSE3 instructions.编译不要使用SSE3指令 4000 -no-ssse3 .......... Do not compile with use of SSSE3 instructions.编译不要使用SSSE3指令 -no-sse4.1 ......... Do not compile with use of SSE4.1 instructions.编译不要使用SSE4.1指令 -no-sse4.2 ......... Do not compile with use of SSE4.2 instructions.编译不要使用SSE4.2指令 -no-avx ............ Do not compile with use of AVX instructions.编译不要使用AVX指令 -no-avx2 ........... Do not compile with use of AVX2 instructions.编译不要使用AVX2指令 -no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.编译不要使用MIPS DSP指令 -no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.编译不要使用MIPS DSP Rev2指令 -qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.把所有的Qt库代码放在名字空间中 -qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.重命名库 -testcocoon ........ Instrument Qt with the TestCocoon code coverage tool. -gcov .............. Instrument Qt with the GCov code coverage tool. -D <string> ........ Add an explicit define to the preprocessor.显式的添加一个宏定义到预处理器 -I <string> ........ Add an explicit include path.显式的添加一个包含路径 -L <string> ........ Add an explicit library path.显式添加一个库路径 + -pkg-config ........ Use pkg-config to detect include and library paths. By default, configure determines whether to use pkg-config or not with some heuristics such as checking the environment variables. 使用pkg-config检测包括库路径。默认情况下,配置决定是否使用pkg-config或不具有启发式如检查环境变量。 -no-pkg-config ..... Disable use of pkg-config.禁用pkg-config支持 -force-pkg-config .. Force usage of pkg-config (skips pkg-config usability detection heuristic).强制使用pkg-config -help, -h .......... Display this information.显示帮助信息. Third Party Libraries: -qt-zlib ........... Use the zlib bundled with Qt. + -system-zlib ....... Use zlib from the operating system. See http://www.gzip.org/zlib -no-mtdev ......... Do not compile mtdev support. + -mtdev ............. Enable mtdev support.mtdev包含了应用程序对多点触摸协议的支持 + -no-journald ....... Do not send logging output to journald. -journald .......... Send logging output to journald.日志输出到journald -no-gif ............ Do not compile GIF reading support. -no-libpng ......... Do not compile PNG support. -qt-libpng ......... Use the libpng bundled with Qt. + -system-libpng ..... Use libpng from the operating system. See http://www.libpng.org/pub/png -no-libjpeg ........ Do not compile JPEG support. -qt-libjpeg ........ Use the libjpeg bundled with Qt. + -system-libjpeg .... Use libjpeg from the operating system. See http://www.ijg.org -no-freetype ....... Do not compile in Freetype2 support. -qt-freetype ....... Use the libfreetype bundled with Qt. + -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active). See http://www.freetype.org -no-harfbuzz ....... Do not compile HarfBuzz-NG support. * -qt-harfbuzz ....... Use HarfBuzz-NG bundled with Qt to do text shaping. It can still be disabled by setting the QT_HARFBUZZ environment variable to "old". -system-harfbuzz ... Use HarfBuzz-NG from the operating system to do text shaping. It can still be disabled by setting the QT_HARFBUZZ environment variable to "old". See http://www.harfbuzz.org -no-openssl ........ Do not compile support for OpenSSL. + -openssl ........... Enable run-time OpenSSL support. -openssl-linked .... Enabled linked OpenSSL support. -qt-pcre ........... Use the PCRE library bundled with Qt. + -system-pcre ....... Use the PCRE library from the operating system. -qt-xcb ............ Use xcb- libraries bundled with Qt. (libxcb.so will still be used from operating system). + -system-xcb ........ Use xcb- libraries from the operating system. -xkb-config-root ... Set default XKB config root. This option is used only together with -qt-xkbcommon. -qt-xkbcommon ...... Use the xkbcommon library bundled with Qt. + -system-xkbcommon .. Use the xkbcommon library from the operating system. -no-xinput2 ........ Do not compile XInput2 support. * -xinput2 ........... Compile XInput2 support. -no-xcb-xlib........ Do not compile Xcb-Xlib support. * -xcb-xlib........... Compile Xcb-Xlib support. -no-glib ........... Do not compile Glib support. + -glib .............. Compile Glib support. -no-pulseaudio ..... Do not compile PulseAudio support. + -pulseaudio ........ Compile PulseAudio support. -no-alsa ........... Do not compile ALSA support. + -alsa .............. Compile ALSA support. -no-gtkstyle ....... Do not compile GTK theme support. + -gtkstyle .......... Compile GTK theme support. Additional options: -make <part> ....... Add part to the list of parts to be built at make time. (defaults to: libs tools examples)在make时添加要构建的组件 -nomake <part> ..... Exclude part from the list of parts to be built.在构建时排除组件 -skip <module> ..... Exclude an entire module from the build.排除整个模块的建立 -no-compile-examples ... Install only the sources of examples.仅安装examples的源码,不要编译它 -no-gui ............ Don't build the Qt GUI module and dependencies.不要构建Qt GUI模块和依赖 + -gui ............... Build the Qt GUI module and dependencies.构建Qt GUI 模块和依赖 -no-widgets ........ Don't build the Qt Widgets module and dependencies.不要构建Qt Widgets 模块和依赖 + -widgets ........... Build the Qt Widgets module and dependencies.构建 Qt Widgets模块和依赖 -R <string> ........ Add an explicit runtime library path to the Qt libraries.显式添加一个运行时库的路径去构建Qt libraries -l <string> ........ Add an explicit library.显式添加一个library -no-rpath .......... Do not use the library install path as a runtime library path.不使用库安装路径作为一个运行时库路径 + -rpath ............. Link Qt libraries and executables using the library install path as a runtime library path. Equivalent to -R install_libpath 链接 Qt 库和可执行文件使用库安装路径作为运行时库路径。相当于-R install_libpath -continue .......... Continue as far as possible if an error occurs.如果发生错误,尽量继续 -verbose, -v ....... Print verbose information about each step of the configure process.打印每个步骤的配置过程的详细的信息 -silent ............ Reduce the build output so that warnings and errors can be seen more easily.减少生成输出,这样可以更容易看到警告和错误 * -no-optimized-qmake ... Do not build qmake optimized. -optimized-qmake ...... Build qmake optimized. -no-nis ............ Do not compile NIS support. * -nis ............... Compile NIS support. -no-cups ........... Do not compile CUPS support. * -cups .............. Compile CUPS support. Requires cups/cups.h and libcups.so.2. -no-iconv .......... Do not compile support for iconv(3). * -iconv ............. Compile support for iconv(3). -no-evdev .......... Do not compile support for evdev. * -evdev ............. Compile support for evdev. -no-icu ............ Do not compile support for ICU libraries. + -icu ............... Compile support for ICU libraries. -no-fontconfig ..... Do not compile FontConfig support. + -fontconfig ........ Compile FontConfig support. -no-strip .......... Do not strip binaries and libraries of unneeded symbols. * -strip ............. Strip binaries and libraries of unneeded symbols when installing. 不对二进制文件和库的使用strip去除不需要的符号. * -no-pch ............ Do not use precompiled header support.不使用预编译的头支持 -pch ............... Use precompiled header support.使用预编译的头支持 -no-dbus ........... Do not compile the Qt D-Bus module.不要编译Qt D-Bus 模块 + -dbus .............. Compile the Qt D-Bus module and dynamically load libdbus-1. -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1.编译Qt D-Bus模块并链接到libdbus-1 -reduce-relocations ..... Reduce relocations in the libraries through extra linker optimizations (Qt/X11 and Qt for Embedded Linux only; experimental; needs GNU ld >= 2.18).减少通过额外的链接器优化库的重加载 (仅qt/X11 和Qt/linux嵌入式 ;实验性的;需要 GNU ld > = 2.18) -no-use-gold-linker ..... Do not link using the GNU gold linker.不要使用GNU gold linker进行链接 + -use-gold-linker ........ Link using the GNU gold linker if available.使用GNU gold linker进行链接 -force-asserts ........ Force Q_ASSERT to be enabled even in release builds.强制启用Q_ASSERT,即使在release构建中 -device <name> ............... Cross-compile for device <name> (experimental),跨平台编译 -device-option <key=value> ... Add device specific options for the device mkspec (experimental),添加device mkspec的device选项 * -no-separate-debug-info . Do not store debug information in a separate file.不将调试信息到一个单独的文件 -separate-debug-info .... Strip debug information into a separate file.将调试信息到一个单独的文件 -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.不要编译Xcb (X protocol C-language Binding) 支持 * -xcb ............... Compile Xcb support.编译 Xcb 支持 -no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.不要编译EGLFS (EGL Full Screen/Single Surface) 支持 * -eglfs ............. Compile EGLFS support.编译 EGLFS 支持 -no-directfb ....... Do not compile DirectFB support.不要编译 DirectFB 支持 * -directfb .......... Compile DirectFB support.编译 DirectFB 支持 -no-linuxfb ........ Do not compile Linux Framebuffer support.不要编译Linux Framebuffer 支持 * -linuxfb ........... Compile Linux Framebuffer support.编译Linux Framebuffer 支持 -no-kms ............ Do not compile KMS support.不要编译KMS支持 * -kms ............... Compile KMS support (Requires EGL).编译KMS -qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).设置默认的QPA 平台 (示例 xcb, cocoa, windows) -xplatform target ... The target platform when cross-compiling.指定目标平台(在跨平台编译时) -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths. 将[code]<dir>设置为目标编译器和 qmake 的 sysroot ,并且也设置 pkg-confing路径
-no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler
当使用-sysroot时, 它禁用将–sysroot传递到编译器
-no-feature-<feature> Do not compile in <feature>.在
<feature>中的不编译
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt
编译
<feature>中的可用的功能介绍在src/corelib/global/qfeatures.txt
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default (full).
-qreal [double|float] typedef qreal to the specified type. The default is double.
Note that changing this flag affects binary compatibility.
为qreal指定类型.默认值是double。请注意,更改此标志影响二进制兼容性
-no-opengl .......... Do not support OpenGL.禁用OpenGL支持
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
OpenGL ES 2.0 and higher, or regular desktop OpenGL.
Use es2 for <api> to override auto-detection.
启用 OpenGL 支持.不带参数时,这将会尝试自动检测的 OpenGL ES 2.0 和更高版本,或常规的桌面版OpenGL.
使用 es2 的
<api>将替代自动检测
* -no-system-proxies .. Do not use system network proxies by default.默认情况下,不使用系统网络代理
-system-proxies ..... Use system network proxies by default.默认情况下,使用系统网络代理
-no-warnings-are-errors Make warnings be treated normally,Make 时把warnings当做正常
-warnings-are-errors Make warnings be treated as errors
(enabled if -developer-build is active)
Make时把warnings 当做错误 (如果启用了-developer-build)
QNX/Blackberry options:
-no-slog2 .......... Do not compile with slog2 support.
-slog2 ............. Compile with slog2 support.
-no-pps ............ Do not compile with pps support.
-pps ............... Compile with pps support.
-no-imf ............ Do not compile with imf support.
-imf ............... Compile with imf support.
-no-lgmon .......... Do not compile with lgmon support.
-lgmon ............. Compile with lgmon support.
MacOS/iOS options:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
-no-framework ...... Do not build Qt as a series of frameworks.
-sdk <sdk> ......... Build Qt using Apple provided SDK <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.
Android options:
-android-sdk path .............. The Android SDK root path.
(default $ANDROID_SDK_ROOT)
-android-ndk path .............. The Android NDK root path.
(default $ANDROID_NDK_ROOT)
-android-ndk-platform .......... Sets the android platform
(default android-9)
-android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.)
(default $ANDROID_NDK_HOST)
-android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips)
(default armeabi-v7a)
-android-toolchain-version ..... Sets the android toolchain version
(default 4.8)
-no-android-style-assets ....... Do not compile in the code which automatically extracts
style assets from the run-time device. Setting this will
make the Android style behave incorrectly, but will enable
compatibility with the LGPL2.1 license.
* -android-style-assets ....
b27a
...... Compile the code which automatically extracts style assets
from the run-time device. This option will make the
Android platform plugin incompatible with the LGPL2.1.
[/code]
相关文章推荐
- [Qt配置指南—2]Qt 5.4.2 Configure Options---Qt配置选项使用
- [Qt配置指南—4]Qt 5.4.2 Configure Options---Qt可达性与编译器选项
- [Qt配置指南—3]Qt 5.4.2 Configure Options---Qt模块与附加功能
- [Qt配置指南—5]Qt 5.4.2 Configure Options---Qt for Embeded Linux嵌入式Linux
- qt-embedded 参数配置介绍
- Qt-configure配置选项
- QT 环境配置选项
- S60: Qt 开发环境配置指南(Carbide gcce)
- 配置Qt-embedded-4.5.1的configure选项
- hadoop配置选项介绍
- qt for android 配置指南
- QT和QT-embedded的配置选项(简易翻译)
- Tomcat配置文件之servlet.xml中选项介绍
- QT和QT-embedded的配置选项_裁剪(简易翻译)
- Configure选项配置的详细介绍
- Exchange 2010 部署配置详细指南(二)Exchage 2010证书配置介绍
- qt embedded配置选项
- S60 Qt 开发环境配置指南(Carbide gcce)
- 2.6内核编译配置选项简介--介绍make menuconfig中的每个选项含义
- qt-embedd-linux4.8.2编译配置选项说明