Qt树莓派交叉编译./configure -help 翻译

这两天在研究Q在树莓派3上的交叉编译,但是一直不顺利,问题基本上都出现在make指令后面,虽然前面的aotuconfig指令是可以通过的,但是还是出问题,看了很多博文,试了很多中不同的config方法,但是还是没有解决,于是决定自己从头翻译一遍configure -help的文档
开始吧!

./configure -help

Configure understands variable assignments like VAR=value on command line. Each uppercased library name (obtainable with -list-libraries) supports the suffixes _INCLUDE, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib), _LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g., ICU_PREFIX=opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".

为可识别的变量名指派值就像在命令行中使用 VAR=value 的写法,每一个大写的库名(与-list–libraries所获得的)支持后缀 _INCLUDE, _LIBDIR, _PREFIX(INCDIR=PREFIX/include, LIBDIR=PREFIX/lib), _LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g., ICU_PREFIX=opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata"

It is also possible to manipulate any QMAKE_* variabele, to amend the values from the mkspec for ths build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.

也可以操作任何QMAKE_*的变量,从mkspec中获取值来构建Qt本身,比如QMAKE——CXXFLAGS+=-g3

Note that the * LIBS * and QMAKE* assignments manipulate lists, so items containting meta characters (spaces in particular) need to be quoted according to qmake rules. On top of that, the assignments as a whole need to be quoted according to shell rules. It is recommended to use single quotes for the inner quoting and double quotes for the outer quoting.

需要注意的是* LIBS * 和 QMAKE * 指派了多个列表,所以包含了元数据的项目需要根据qmake的规则来引用,除此之外,作为一个整体来分配需要根据shell原则来引用,建议对内部引用使用单一引用,外部引用使用双重引用

Top-level installation directories:

命令说明
-prefix < dir >The deployment directory, as seen on the target device. [/usr/local/Qt-$QT_VERSION; qtbase build directory if -developer-build]
-prefix < dir >部署目录,可以在目标设备上看到
-extprefix < dir >The installation directory, as seen on the host
安装目录可以在主机上看到
-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. [EXTPEFIX]
-hostprefix [dir]运行在主机上的构建工具的安装目录,日过灭有指定 [dir] 则会使用当前构建的地址
-external-hostbindir < path >Path to Qt tools built for this machine. Use this when -platform does not match ths current system, i.e., to make a Canadian Cross Build
-external-hostbindir < path >为这台机器所构建的Qt工具的路径,当 -platform 和当前的系统不同的时候使用,比如构建Canadian Cross

微调目录列表,需要注意的是所有的目录,除了 -sysconfdir,应该放置在 -prefix/-hostprefix中

命令说明
-bindir < dir >Executables [PREFIX/bin] 可执行的 [PREFIX/bin]
-headerdir < dir >Header files [PREFIX/include] 头文件[PREFIX/bin]
-libdir < dir >Libraries [PREFIX/lib] 库[PREFIX/lib]
-archdatadir < dir >Arch-dependent data [PREFIX] 主要依赖数据 [PREFIX]
-plugindir < dir >Plugins [ARCHDATADIR/plugins] 插件 [ARCHDATADIR/plugins]
-libexecdir < dir >Helper programs [ARCHDATADIR/bin on Windows, ARCHDATADIR/libexec otherwise] 帮助程序
-importdir < dir >QML1 import [ARCHDATADIR/imports] QML1导入
-libexecdir < dir >QML2 imports [ARCHDATAIR/qml] QML2导入
-datadir < dir >Arch-independent data [PREFIX] 主要依赖数据
-docdir < dir >Documentation [DATADIR/doc] 文档
-translationdir < dir >Translations [DATADIR/translation] 传输
-sysconfdir < dir >Setting used by Qt programs [PREFIX/etc/xdg] Qt程序所使用的设置
-examplesdir < dir >Examples [PREFIX/tests] 范例
-testsdir < dir >Test [PREFIX/tests] 测试
-hostbindir < dir >Host executables [HOSTPREFIX/bin] 主机执行文件
-hostlibdir < dir >Host libraries [HOSTPREFIX/lib] 主机库
-hostdatadir < dir >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 specifid; ‘auto’ is a shorthand for ‘yes/no’. Solitaray ‘yes’ and ‘no’ represent binary options without auto-detection
其余选项的约定:当一个选项后面的值被括号扩住的时候,按照下面的进行解析:“yes”代表空选项;所有的其他的值都可以作为这个选项的前缀,比如 -no-gu;否则这个值可以被指定,比如:-gui=yes,如果没有指定的话,值会按照他们尝试的次序来列出,‘auto’ 是对’yes/no’。单独的’yes’或者’no’代表不包含自动搜寻的二进制选项

Configure meta

选项说明
-help, -h显示帮助界面
-verbose, -v在配置的时候打印复杂的信息
-continue在出现故障的时候继续配置
-redo使用之前使用的选项来重新配置,附加的选项可能被忽略,但是将不会储存从而被 -redo在后面使用
recheck [test, …]清除缓存,消极的测试配置结果,在安装后丢失依赖后使用,否则,如果测试是指定的,只有他们的结果被清除
-recheck-all清除测试结果的所有配置
-feature-< feature >Enable < feature >
-no-feature-< feature >禁用< feature > [none]
-list-features列举所有可用的特性,也需要注意的是一些特性有专有的命令行选项
-list-libraries列出额外的可能的依赖

Build options:

选项说明
-opensource构建开源Qt
-commercial构建商业版Qt
-confirm-license自动识别license
-release构建Qt关闭Debug[yes]
-debug构建Qt使能Debug[No]
-debug-and-release构建两个Qt,一个有debug,一个没有debug,仅支持在Apple和Windows中
-optimize-debug使能友好debug选项在debug构建模式中[auto],不支持MSVC和Clang工具链
-optimize-size优化构建的大小而非速度[no]
-optimized-tools充分利用主机的工具来构建即使在debug构建中[no]
-force-debug-info为release构建创建语法文件[no]
-separate-debug-info将Debug信息分割成文件[no]
-gdb-index索引debug信息来提升GDB[no]
-strip为不需要的语法去除release binaries
-gc-binaries放置每一个二进制文件到他们自己的章节中,并且使能不适用的章节中的链接垃圾收集[在静态构建中是auto,其他时候是no]
-force-asserts使能Q_ASSERT即使在release构建中[no]
-developer-build编译和链接Qt本身[no]
-shared编译Qt动态链接库[yes]
-static编译Qt静态链接库[no]
-framework构建Qt构建包[yes]
-platform < target >选择主机的构建 mkspec[deceted]
-xplatform < target >在交叉编译中选择目标mkspc[PLATFORM]
-device < name >构建某设备的交叉编译
-device-option < key=value >添加设备mkspec的选项
-appstore-compliant禁用平台APPStore中不允许的代码,如果在APPStore中默认是分配的,那么默认是no,尤其在安卓,ios,tvos,还有未指定的Windows平台中[auto]
-qtnamespace < name >封装namespace中所有Qt的库
-qtlibinfix < infix >在libQt5*< infix >.so 中重命名所有的libQt5*.so
-testcocoonn使用TestCocoon代码覆盖工具进行测试[no]
-gov使用GCov代码覆盖工具进行测试[no]
-trace [backend]使能带追踪点的设备,当前只支持的终端是windows和linux[no]
-sanitize {addres/thread/memory/undefind}创建制定的编译器过滤器
-c++std < edition >选择C++标准 < edition > [c++1z/c++14/c++11](不支持MSVC)
-sse2使用SSE2设备[aotu]
-sse3/-ssse3/-sse4.1/-sse4.2/-avx/-avx2/-avx512允许使用特殊的x86设备[auto]
-mip_dsp/-mips_dspr2使用MIPS DSP/rev2 设备 [auto]
qreal < type >指定qreal到指定的类型[double]
-R < string >添加一个明确的runtime库路径到Qt库中,支持和LIBDIR相关的路径
rpath使用库安装路径作为一个运行库路径来链接Qt库和可执行文件,禁用这个意味着使用绝对安装名称(基于LIBDIR)用在动态链接库和框架中[auto]
-reduce-exparts减少大量的导出语法[auto]
-reduce-relocations减少大量的重定向[auto]
-reduce-relocations在插件中嵌入 [no]
-static-runtime可 -static一起使用,使用static runtime[no]
-pch使用预编译头文件[auto]
-ltcg使用链接时刻代码生成[no]
-use-gold-linker使用GNU gold linker[auto]
-incredibuild-xge使用incredibuild XGE[no](window noly)
-ccache使用ccache编译器缓存[no] (linux only)
-make-tool < tool >使用< tool >来构建qmake[nmake] (windowsonly)
-mp使用多进程编译(MSVC only)
-warning-are-errors警告是错误[no]
-silent减少构建输出,这样错误和警告就会出现的更明显

Build environment

选项说明
-sysroot < dir >设置 < dir > 作为目标sysroot
-gcc-sysroot和 -sysroot一起,让编译器忽略 --sysroot[yes]
-pkg-config使用ppkg-config[auto]
-D < string >通过附加的预处理器
-I < string >通过附加的包含路径
-L < string >通过附加的库路径
-F < string >通过附加的框架路径
-sdk < sdk >使用Apple提供的SDK来构建Qt

Component selection

选项说明
-skip < repo >在构建过程中排除整个库
-make < part >添加 < part > 到所构建的parts列表中
-nomake < part >从构建的parts列表中排除< part >
-compile-examples当没有设置的死后,仅仅安装例子的源码[不在 WebAssembly中,否则是yes]
-gui构建gui模块[yes]
-widgets构建widget模块[yes]
-no-dbus不构建D-Bus
-dbus-linked构建Qt D-Bus并且链接到libdbus-1中
-dbus-runtime构建Qt D-Bus并且动态链接到libdbus-1中
-accessibility使能可访问的支持[yes]

Qt还绑定这一些第三方的库,他们默认情况下是使用的

Core options:

选项描述
-doubleconversion选择所使用的double转换库[system/qt/no]
-glib使能Glib支持[no, auto on Unix]
-eventfd使能eventfd 支持
-inotify使能inotify支持
-iconv使能 iconv支持
-icu使能ICU支持
-pcre选择所使用的libpcre2[system/qt]
-pps使能pps支持
-zlib选择所使用的zlib[system/qt]

Logging backends

选项描述
-journald使能journald支持[no]
-syslog使能syslog支持[no]
-slog2使能slog2支持[auto]

Network options:

选项描述
-ssl使能SSL支持[auto]
-no-openssl不使用openssl
-openssl-linked使用OpenSSL并且链接到libssl中[no]
-openssl-runtime使用OpenSSL并且动态链接libssl[auto]
-securetransport使用秘密传输端口[auto]
-sctp使能sctp支持[no]
-libproxy使能libproxy[no]
-system-proxies默认情况下使用系统代理[yes]

Gui, printing, widget, options:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值