| 1 |
Usage: configure [options] [assignments] |
| 2 |
|
| 3 |
Configure understands variable assignments like VAR=value on the command line. |
| 4 |
Each uppercased library name (obtainable with -list-libraries) supports the |
| 5 |
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib), |
| 6 |
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g., |
| 7 |
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata". |
| 8 |
|
| 9 |
It is also possible to manipulate any QMAKE_* variable, to amend the values |
| 10 |
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3. |
| 11 |
|
| 12 |
Note that the *_LIBS* and QMAKE_* assignments manipulate lists, so items |
| 13 |
containing meta characters (spaces in particular) need to be quoted according |
| 14 |
to qmake rules. On top of that, the assignments as a whole need to be quoted |
| 15 |
according to shell rules. It is recommended to use single quotes for the inner |
| 16 |
quoting and double quotes for the outer quoting. |
| 17 |
|
| 18 |
Top-level installation directories: |
| 19 |
-prefix <dir> ...... The deployment directory, as seen on the target device. |
| 20 |
[/usr/local/Qt-$QT_VERSION; qtbase build directory if |
| 21 |
-developer-build] |
| 22 |
-extprefix <dir> ... The installation directory, as seen on the host machine. |
| 23 |
[SYSROOT/PREFIX] |
| 24 |
-hostprefix [dir] .. The installation directory for build tools running on |
| 25 |
the host machine. If [dir] is not given, the current |
| 26 |
build directory will be used. [EXTPREFIX] |
| 27 |
-external-hostbindir <path> ... Path to Qt tools built for this machine. |
| 28 |
Use this when -platform does not match the current |
| 29 |
system, i.e., to make a Canadian Cross Build. |
| 30 |
|
| 31 |
Fine tuning of installation directory layout. Note that all directories |
| 32 |
except -sysconfdir should be located under -prefix/-hostprefix: |
| 33 |
|
| 34 |
-bindir <dir> ......... Executables [PREFIX/bin] |
| 35 |
-headerdir <dir> ...... Header files [PREFIX/include] |
| 36 |
-libdir <dir> ......... Libraries [PREFIX/lib] |
| 37 |
-archdatadir <dir> .... Arch-dependent data [PREFIX] |
| 38 |
-plugindir <dir> ...... Plugins [ARCHDATADIR/plugins] |
| 39 |
-libexecdir <dir> ..... Helper programs [ARCHDATADIR/bin on Windows, |
| 40 |
ARCHDATADIR/libexec otherwise] |
| 41 |
-importdir <dir> ...... QML1 imports [ARCHDATADIR/imports] |
| 42 |
-qmldir <dir> ......... QML2 imports [ARCHDATADIR/qml] |
| 43 |
-datadir <dir> ........ Arch-independent data [PREFIX] |
| 44 |
-docdir <dir> ......... Documentation [DATADIR/doc] |
| 45 |
-translationdir <dir> . Translations [DATADIR/translations] |
| 46 |
-sysconfdir <dir> ..... Settings used by Qt programs [PREFIX/etc/xdg] |
| 47 |
-examplesdir <dir> .... Examples [PREFIX/examples] |
| 48 |
-testsdir <dir> ....... Tests [PREFIX/tests] |
| 49 |
|
| 50 |
-hostbindir <dir> ..... Host executables [HOSTPREFIX/bin] |
| 51 |
-hostlibdir <dir> ..... Host libraries [HOSTPREFIX/lib] |
| 52 |
-hostdatadir <dir> .... Data used by qmake [HOSTPREFIX] |
| 53 |
|
| 54 |
Conventions for the remaining options: When an option's description is |
| 55 |
followed by a list of values in brackets, the interpretation is as follows: |
| 56 |
'yes' represents the bare option; all other values are possible prefixes to |
| 57 |
the option, e.g., -no-gui. Alternatively, the value can be assigned, e.g., |
| 58 |
--gui=yes. Values are listed in the order they are tried if not specified; |
| 59 |
'auto' is a shorthand for 'yes/no'. Solitary 'yes' and 'no' represent binary |
| 60 |
options without auto-detection. |
| 61 |
|
| 62 |
Configure meta: |
| 63 |
|
| 64 |
-help, -h ............ Display this help screen |
| 65 |
-verbose, -v ......... Print verbose messages during configuration |
| 66 |
-continue ............ Continue configure despite errors |
| 67 |
-redo ................ Re-configure with previously used options. |
| 68 |
Additional options may be passed, but will not be |
| 69 |
saved for later use by -redo. |
| 70 |
-recheck [test,...] .. Discard cached negative configure test results. |
| 71 |
Use this after installing missing dependencies. |
| 72 |
Alternatively, if tests are specified, only their |
| 73 |
results are discarded. |
| 74 |
-recheck-all ......... Discard all cached configure test results. |
| 75 |
|
| 76 |
-feature-<feature> ... Enable <feature> |
| 77 |
-no-feature-<feature> Disable <feature> [none] |
| 78 |
-list-features ....... List available features. Note that some features |
| 79 |
have dedicated command line options as well. |
| 80 |
|
| 81 |
-list-libraries ...... List possible external dependencies. |
| 82 |
|
| 83 |
Build options: |
| 84 |
|
| 85 |
-opensource .......... Build the Open-Source Edition of Qt |
| 86 |
-commercial .......... Build the Commercial Edition of Qt |
| 87 |
-confirm-license ..... Automatically acknowledge the license |
| 88 |
|
| 89 |
-release ............. Build Qt with debugging turned off [yes] |
| 90 |
-debug ............... Build Qt with debugging turned on [no] |
| 91 |
-debug-and-release ... Build two versions of Qt, with and without |
| 92 |
debugging turned on [yes] (Apple and Windows only) |
| 93 |
-optimize-debug ...... Enable debug-friendly optimizations in debug builds |
| 94 |
[auto] (Not supported with MSVC or Clang toolchains) |
| 95 |
-optimize-size ....... Optimize release builds for size instead of speed [no] |
| 96 |
-optimized-tools ..... Build optimized host tools even in debug build [no] |
| 97 |
-force-debug-info .... Create symbol files for release builds [no] |
| 98 |
-separate-debug-info . Split off debug information to separate files [no] |
| 99 |
-gdb-index ........... Index the debug info to speed up GDB |
| 100 |
[no; auto if -developer-build with debug info] |
| 101 |
-strip ............... Strip release binaries of unneeded symbols [yes] |
| 102 |
-gc-binaries ......... Place each function or data item into its own section |
| 103 |
and enable linker garbage collection of unused |
| 104 |
sections. [auto for static builds, otherwise no] |
| 105 |
-force-asserts ....... Enable Q_ASSERT even in release builds [no] |
| 106 |
-developer-build ..... Compile and link Qt for developing Qt itself |
| 107 |
(exports for auto-tests, extra checks, etc.) [no] |
| 108 |
|
| 109 |
-shared .............. Build shared Qt libraries [yes] (no for UIKit) |
| 110 |
-static .............. Build static Qt libraries [no] (yes for UIKit) |
| 111 |
-framework ........... Build Qt framework bundles [yes] (Apple only) |
| 112 |
|
| 113 |
-platform <target> ... Select host mkspec [detected] |
| 114 |
-xplatform <target> .. Select target mkspec when cross-compiling [PLATFORM] |
| 115 |
-device <name> ....... Cross-compile for device <name> |
| 116 |
-device-option <key=value> ... Add option for the device mkspec |
| 117 |
|
| 118 |
-appstore-compliant .. Disable code that is not allowed in platform app stores. |
| 119 |
This is on by default for platforms which require distribution |
| 120 |
through an app store by default, in particular Android, |
| 121 |
iOS, tvOS, watchOS, and Universal Windows Platform. [auto] |
| 122 |
|
| 123 |
-qtnamespace <name> .. Wrap all Qt library code in 'namespace <name> {...}'. |
| 124 |
-qtlibinfix <infix> .. Rename all libQt5*.so to libQt5*<infix>.so. |
| 125 |
-qtlibinfix-plugins .. Rename Qt plugins according to -qtlibinfix [no] |
| 126 |
|
| 127 |
-testcocoon .......... Instrument with the TestCocoon code coverage tool [no] |
| 128 |
-gcov ................ Instrument with the GCov code coverage tool [no] |
| 129 |
|
| 130 |
-trace [backend] ..... Enable instrumentation with tracepoints. |
| 131 |
Currently supported backends are 'etw' (Windows) and |
| 132 |
'lttng' (Linux), or 'yes' for auto-detection. [no] |
| 133 |
|
| 134 |
-sanitize {address|thread|memory|fuzzer-no-link|undefined} |
| 135 |
Instrument with the specified compiler sanitizer. |
| 136 |
Note that some sanitizers cannot be combined; |
| 137 |
for example, -sanitize address cannot be combined with |
| 138 |
-sanitize thread. |
| 139 |
|
| 140 |
-coverage {trace-pc-guard|source-based} |
| 141 |
Specify the 'trace-pc-guard' coverage instrumentation for |
| 142 |
sanitizers or generate instrumented code to collect execution |
| 143 |
counts and enable code coverage analysis, respectively. (Clang only) |
| 144 |
|
| 145 |
-c++std <edition> .... Select C++ standard <edition> [c++2a/c++17/c++14/c++11] |
| 146 |
(Not supported with MSVC 2015) |
| 147 |
|
| 148 |
-sse2 ................ Use SSE2 instructions [auto] |
| 149 |
-sse3/-ssse3/-sse4.1/-sse4.2/-avx/-avx2/-avx512 |
| 150 |
Enable use of particular x86 instructions [auto] |
| 151 |
Enabled ones are still subject to runtime detection. |
| 152 |
-mips_dsp/-mips_dspr2 Use MIPS DSP/rev2 instructions [auto] |
| 153 |
|
| 154 |
-qreal <type> ........ typedef qreal to the specified type. [double] |
| 155 |
Note: this affects binary compatibility. |
| 156 |
|
| 157 |
-R <string> .......... Add an explicit runtime library path to the Qt |
| 158 |
libraries. Supports paths relative to LIBDIR. |
| 159 |
-rpath ............... Link Qt libraries and executables using the library |
| 160 |
install path as a runtime library path. Similar to |
| 161 |
-R LIBDIR. On Apple platforms, disabling this implies |
| 162 |
using absolute install names (based in LIBDIR) for |
| 163 |
dynamic libraries and frameworks. [auto] |
| 164 |
|
| 165 |
-reduce-exports ...... Reduce amount of exported symbols [auto] |
| 166 |
-reduce-relocations .. Reduce amount of relocations [auto] (Unix only) |
| 167 |
|
| 168 |
-plugin-manifests .... Embed manifests into plugins [no] (Windows only) |
| 169 |
-static-runtime ...... With -static, use static runtime [no] (Windows only) |
| 170 |
|
| 171 |
-pch ................. Use precompiled headers [auto] |
| 172 |
-ltcg ................ Use Link Time Code Generation [no] |
| 173 |
-linker [bfd,gold,lld] Force use of the GNU ld, GNU gold or LLVM/LLD linker |
| 174 |
instead of default one (GCC only) |
| 175 |
-incredibuild-xge .... Use the IncrediBuild XGE [no] (Windows only) |
| 176 |
-ccache .............. Use the ccache compiler cache [no] (Unix only) |
| 177 |
-make-tool <tool> .... Use <tool> to build qmake [nmake] (Windows only) |
| 178 |
-mp .................. Use multiple processors for compilation (MSVC only) |
| 179 |
|
| 180 |
-warnings-are-errors . Treat warnings as errors [no; yes if -developer-build] |
| 181 |
-silent .............. Reduce the build output so that warnings and errors |
| 182 |
can be seen more easily |
| 183 |
|
| 184 |
Build environment: |
| 185 |
|
| 186 |
-sysroot <dir> ....... Set <dir> as the target sysroot |
| 187 |
-gcc-sysroot ......... With -sysroot, pass --sysroot to the compiler [yes] |
| 188 |
|
| 189 |
-pkg-config .......... Use pkg-config [auto] (Unix only) |
| 190 |
|
| 191 |
-D <string> .......... Pass additional preprocessor define |
| 192 |
-I <string> .......... Pass additional include path |
| 193 |
-L <string> .......... Pass additional library path |
| 194 |
-F <string> .......... Pass additional framework path (Apple only) |
| 195 |
|
| 196 |
-sdk <sdk> ........... Build Qt using Apple provided SDK <sdk>. The argument |
| 197 |
should be one of the available SDKs as listed by |
| 198 |
'xcodebuild -showsdks'. |
| 199 |
Note that the argument applies only to Qt libraries |
| 200 |
and applications built using the target mkspec - not |
| 201 |
host tools such as qmake, moc, rcc, etc. |
| 202 |
|
| 203 |
-android-sdk path .... Set Android SDK root path [$ANDROID_SDK_ROOT] |
| 204 |
-android-ndk path .... Set Android NDK root path [$ANDROID_NDK_ROOT] |
| 205 |
-android-ndk-platform Set Android platform |
| 206 |
-android-ndk-host .... Set Android NDK host (linux-x86, linux-x86_64, etc.) |
| 207 |
[$ANDROID_NDK_HOST] |
| 208 |
-android-abis ....... Comma separated Android abis, default is: |
| 209 |
armeabi-v7a,arm64-v8a,x86,x86_64 |
| 210 |
-android-style-assets Automatically extract style assets from the device at |
| 211 |
run time. This option makes the Android style behave |
| 212 |
correctly, but also makes the Android platform plugin |
| 213 |
incompatible with the LGPL2.1. [yes] |
| 214 |
|
| 215 |
Component selection: |
| 216 |
|
| 217 |
-skip <repo> ......... Exclude an entire repository from the build. |
| 218 |
-make <part> ......... Add <part> to the list of parts to be built. |
| 219 |
Specifying this option clears the default list first. |
| 220 |
[libs and examples, also tools if not cross-building, |
| 221 |
also tests if -developer-build] |
| 222 |
-nomake <part> ....... Exclude <part> from the list of parts to be built. |
| 223 |
-compile-examples .... When unset, install only the sources of examples |
| 224 |
[no on WebAssembly, otherwise yes] |
| 225 |
-gui ................. Build the Qt GUI module and dependencies [yes] |
| 226 |
-widgets ............. Build the Qt Widgets module and dependencies [yes] |
| 227 |
-no-dbus ............. Do not build the Qt D-Bus module |
| 228 |
[default on Android and Windows] |
| 229 |
-dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto] |
| 230 |
-dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no] |
| 231 |
-accessibility ....... Enable accessibility support [yes] |
| 232 |
Note: Disabling accessibility is not recommended. |
| 233 |
|
| 234 |
Qt comes with bundled copies of some 3rd party libraries. These are used |
| 235 |
by default if auto-detection of the respective system library fails. |
| 236 |
|
| 237 |
Core options: |
| 238 |
|
| 239 |
-doubleconversion .... Select used double conversion library [system/qt/no] |
| 240 |
No implies use of sscanf_l and snprintf_l (imprecise). |
| 241 |
-glib ................ Enable Glib support [no; auto on Unix] |
| 242 |
-eventfd ............. Enable eventfd support |
| 243 |
-inotify ............. Enable inotify support |
| 244 |
-iconv ............... Enable iconv(3) support [posix/sun/gnu/no] (Unix only) |
| 245 |
-icu ................. Enable ICU support [auto] |
| 246 |
-pcre ................ Select used libpcre2 [system/qt/no] |
| 247 |
-pps ................. Enable PPS support [auto] (QNX only) |
| 248 |
-zlib ................ Select used zlib [system/qt] |
| 249 |
|
| 250 |
Logging backends: |
| 251 |
-journald .......... Enable journald support [no] (Unix only) |
| 252 |
-syslog ............ Enable syslog support [no] (Unix only) |
| 253 |
-slog2 ............. Enable slog2 support [auto] (QNX only) |
| 254 |
|
| 255 |
Network options: |
| 256 |
|
| 257 |
-ssl ................. Enable either SSL support method [auto] |
| 258 |
-no-openssl .......... Do not use OpenSSL [default on Apple and WinRT] |
| 259 |
-openssl-linked ...... Use OpenSSL and link to libssl [no] |
| 260 |
-openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto] |
| 261 |
-schannel ............ Use Secure Channel [no] (Windows only) |
| 262 |
-securetransport ..... Use SecureTransport [auto] (Apple only) |
| 263 |
|
| 264 |
-sctp ................ Enable SCTP support [no] |
| 265 |
|
| 266 |
-libproxy ............ Enable use of libproxy [no] |
| 267 |
-system-proxies ...... Use system network proxies by default [yes] |
| 268 |
|
| 269 |
Gui, printing, widget options: |
| 270 |
|
| 271 |
-cups ................ Enable CUPS support [auto] (Unix only) |
| 272 |
|
| 273 |
-fontconfig .......... Enable Fontconfig support [auto] (Unix only) |
| 274 |
-freetype ............ Select used FreeType [system/qt/no] |
| 275 |
-harfbuzz ............ Select used HarfBuzz-NG [system/qt/no] |
| 276 |
(Not auto-detected on Apple and Windows) |
| 277 |
|
| 278 |
-gtk ................. Enable GTK platform theme support [auto] |
| 279 |
|
| 280 |
-lgmon ............... Enable lgmon support [auto] (QNX only) |
| 281 |
|
| 282 |
-no-opengl ........... Disable OpenGL support |
| 283 |
-opengl <api> ........ Enable OpenGL support. Supported APIs: |
| 284 |
es2 (default on Windows), desktop (default on Unix), |
| 285 |
dynamic (Windows only) |
| 286 |
-opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto] |
| 287 |
-egl ................. Enable EGL support [auto] |
| 288 |
-angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto] |
| 289 |
(Windows only) |
| 290 |
-combined-angle-lib .. Merge LibEGL and LibGLESv2 into LibANGLE (Windows only) |
| 291 |
|
| 292 |
-qpa <name> .......... Select default QPA backend(s) (e.g., xcb, cocoa, windows) |
| 293 |
A prioritized list separated by semi-colons. |
| 294 |
-xcb-xlib............. Enable Xcb-Xlib support [auto] |
| 295 |
|
| 296 |
Platform backends: |
| 297 |
-direct2d .......... Enable Direct2D support [auto] (Windows only) |
| 298 |
-directfb .......... Enable DirectFB support [no] (Unix only) |
| 299 |
-eglfs ............. Enable EGLFS support [auto; no on Android and Windows] |
| 300 |
-gbm ............... Enable backends for GBM [auto] (Linux only) |
| 301 |
-kms ............... Enable backends for KMS [auto] (Linux only) |
| 302 |
-linuxfb ........... Enable Linux Framebuffer support [auto] (Linux only) |
| 303 |
-xcb ............... Enable X11 support [auto] (Linux only) |
| 304 |
|
| 305 |
Input backends: |
| 306 |
-libudev............ Enable udev support [auto] |
| 307 |
-evdev ............. Enable evdev support [auto] |
| 308 |
-imf ............... Enable IMF support [auto] (QNX only) |
| 309 |
-libinput .......... Enable libinput support [auto] |
| 310 |
-mtdev ............. Enable mtdev support [auto] |
| 311 |
-tslib ............. Enable tslib support [auto] |
| 312 |
-bundled-xcb-xinput Use bundled XInput2 support [auto] |
| 313 |
-xkbcommon ......... Enable key mapping support [auto] |
| 314 |
|
| 315 |
Image formats: |
| 316 |
-gif ............... Enable reading support for GIF [auto] |
| 317 |
-ico ............... Enable support for ICO [yes] |
| 318 |
-libpng ............ Select used libpng [system/qt/no] |
| 319 |
-libjpeg ........... Select used libjpeg [system/qt/no] |
| 320 |
|
| 321 |
Database options: |
| 322 |
|
| 323 |
-sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers: |
| 324 |
db2 ibase mysql oci odbc psql sqlite2 sqlite tds |
| 325 |
[all auto] |
| 326 |
-sqlite .............. Select used sqlite3 [system/qt] |