Configuration Options for Qt

This page gives a brief description of the different options available when building Qt using the configure script or configure.exe binary. To build Qt using the default options, just call configure from the command line as shown below.

When building on Linux, Mac OS X and Unix platforms:

./configure

On Windows, run the corresponding executable:

.\configure.exe

If you would like to customize your build, please use the options listed in the following tables. To see the full list of options, invoke the configure tool with the -help command line option.

Cross platform options:

OptionDescriptionNote
-buildkey <key>Build the Qt library and plugins using the specified
<key>When the library loads plugins, it will only load those that have a matching <key>.
-releaseCompile and link Qt with debugging turned off.
-debugCompile and link Qt with debugging turned on.Default value.
-debug-and-releaseCompile and link two Qt libraries, with and without debugging turned on.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-opensourceCompile and link the Open-Source Edition of Qt.
-commercialCompile and link the Commercial Edition of Qt.
-developer-buildCompile and link Qt with Qt developer options including auto-tests exporting)
-sharedCreate and use shared Qt libraries.Default value.
-staticCreate and use static Qt libraries.
-ltcgUse Link Time Code Generation.Apply to release builds only.
-no-ltcgDo not use Link Time Code Generation.Default value.
-no-fastConfigure Qt normally by generating Makefiles for all project files.Default value.
-fastConfigure Qt quickly by generating Makefiles only for library and subdirectory targets.All other Makefiles are created as wrappers which will in turn run qmake.
-no-exceptionsDisable exceptions on platforms that support it.
-exceptionsEnable exceptions on platforms that support it.Default value.
-no-accessibilityDo not compile Windows Active Accessibility support.
-accessibilityCompile Windows Active Accessibility support.Default value.
-no-stlDo not compile STL support.
-stlCompile STL support.Default value.
-no-sql-<driver>Disable SQL <driver> entirely, by default none are turned on.
-qt-sql-<driver>Enable a SQL <driver> in the Qt Library.
-plugin-sql-<driver>Enable SQL <driver> as a plugin to be linked to at run time.Available values for <driver>: mysql, psql, oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a '+' during configure have been detected as available on this system.
-system-sqliteUse sqlite from the operating system.
-no-qt3supportDisables the Qt 3 support functionality.
-no-openglDisables OpenGL functionality
-opengl <api>Enable OpenGL support with specified API version.Available values for <api>: desktop - Enable support for Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common Profile, es2 - Enable support for OpenGL ES 2.0.
-no-openvgDisables OpenVG functionalityDefault value.
-openvgEnables OpenVG functionalityRequires EGL support, typically supplied by an OpenGL or other graphics implementation.
-platform <spec>The operating system and compiler you are building on.The default value is %QMAKESPEC%.
-xplatform <spec>The operating system and compiler you are cross compiling for.See the README file for a list of supported operating systems and compilers.
-system-proxiesUse system network proxies by default.
-no-system-proxiesDo not use system network proxies by default.
-qtnamespace <namespace>Wraps all Qt library code in 'namespace name {..}
-qtlibinfix <infix>Renames all Qt* libs to Qt*<infix>
-D <define>Add an explicit define to the preprocessor.
-I <includepath>Add an explicit include path.
-L <librarypath>Add an explicit library path.
-l <libraryname>Add an explicit library name, residing in a librarypath.
-graphicssystem <sys>Specify which graphics system should be used.Available values for <sys>: * raster - Software rasterizer, opengl - Using OpenGL acceleration, experimental!, openvg - Using OpenVG acceleration, experimental!
-help, -h, -?Display this information.

Third Party Libraries

OptionDescriptionNote
-qt-zlibUse the zlib bundled with Qt.
-system-zlibUse zlib from the operating system.See http://www.gzip.org/zlib
-no-gifDo not compile GIF reading support.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-libpngDo not compile PNG support.
-qt-libpngUse the libpng bundled with Qt.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-system-libpngUse libpng from the operating system.See http://www.libpng.org/pub/png
-no-libmngDo not compile MNG support.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-qt-libmngUse the libmng bundled with Qt.
-system-libmngUse libmng from the operating system.See http://www.libmng.com
-no-libtiffDo not compile TIFF support.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-qt-libtiffUse the libtiff bundled with Qt.
-system-libtiffUse libtiff from the operating system.See http://www.libtiff.org
-no-libjpegDo not compile JPEG support.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-qt-libjpegUse the libjpeg bundled with Qt.
-system-libjpegUse libjpeg from the operating system.See http://www.ijg.org. This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.

Qt for Windows only:

OptionDescriptionNote
-no-dspDo not generate VC++ .dsp files.
-dspGenerate VC++ .dsp files, only if spec "win32-msvc".Default value.
-no-vcprojDo not generate VC++ .vcproj files.
-vcprojGenerate VC++ .vcproj files, only if platform "win32-msvc.net".Default value.
-no-incredibuild-xgeDo not add IncrediBuild XGE distribution commands to custom build steps.
-incredibuild-xgeAdd IncrediBuild XGE distribution commands to custom build steps. This will distribute MOC and UIC steps, and other custom buildsteps which are added to the INCREDIBUILD_XGE variable.The IncrediBuild distribution commands are only added to Visual Studio projects. This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-plugin-manifestsDo not embed manifests in plugins.
-plugin-manifestsEmbed manifests in plugins.Default value.
-no-qmakeDo not compile qmake.
-qmakeCompile qmake.Default value
-dont-processDo not generate Makefiles/Project files. This will override -no-fast if specified.
-processGenerate Makefiles/Project files.Default value.
-no-rttiDo not compile runtime type information.
-rttiCompile runtime type information.Default value.
-no-mmxDo not compile with use of MMX instructions
-mmxCompile with use of MMX instructionsThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-3dnowDo not compile with use of 3DNOW instructions
-3dnowCompile with use of 3DNOW instructionsThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-sseDo not compile with use of SSE instructions
-sseCompile with use of SSE instructionsThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-sse2Do not compile with use of SSE2 instructions
-sse2Compile with use of SSE2 instructionsThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-opensslDo not compile in OpenSSL support
-opensslCompile in run-time OpenSSL supportThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-openssl-linkedCompile in linked OpenSSL support
-no-dbusDo not compile in D-Bus support
-dbusCompile in D-Bus support and load libdbus-1 dynamically.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-dbus-linkedCompile in D-Bus support and link to libdbus-1
-no-phononDo not compile in the Phonon module
-phononCompile the Phonon module.Phonon is built if a decent C++ compiler is used. This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-phonon-backendDo not compile the platform-specific Phonon backend-plugin
-phonon-backendCompile in the platform-specific Phonon backend-pluginDefault value.
-no-multimediaDo not compile the multimedia module
-multimediaCompile in multimedia moduleDefault value.
-no-audio-backendDo not compile in the platform audio backend into QtMultimedia
-audio-backendCompile in the platform audio backend into QtMultimediaThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-webkitDo not compile in the WebKit module
-webkitCompile in the WebKit moduleWebKit is built if a decent C++ compiler is used. This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-webkit-debugCompile in the WebKit module with debug symbols.
-no-scriptDo not build the QtScript module.
-scriptBuild the QtScript module.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-scripttoolsDo not build the QtScriptTools module.
-scripttoolsBuild the QtScriptTools module.This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-declarativeDo not build the declarative module
-declarativeBuild the declarative moduleThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-declarative-debugDo not build the declarative debugging support
-declarative-debugBuild the declarative debugging supportDefault value.
-arch <arch>Specify an architecture.Available values for <arch>: * windows, windowsce, symbian, boundschecker, generic.
-no-style-<style>Disable <style> entirely.
-qt-style-<style>Enable <style> in the Qt Library.Available styles: * windows, + windowsxp, + windowsvista, * plastique, * cleanlooks, * motif, * cde, windowsce, windowsmobile, s60
-no-native-gesturesDo not use native gestures on Windows 7.
-native-gesturesUse native gestures on Windows 7.Default value.
-no-mpDo not use multiple processors for compiling with MSVCDefault value.
-mpUse multiple processors for compiling with MSVC (-MP)
-loadconfig <config>Run configure with the parameters from file configure_<config>.cache.
-saveconfig <config>Run configure and save the parameters in file configure_<config>.cache.
-redoRun configure with the same parameters as last time.

Qt for Windows CE only:

OptionDescriptionNote
-no-iwmmxtDo not compile with use of IWMMXT instructions
-iwmmxtDo compile with use of IWMMXT instructions.This is for Qt for Windows CE on Arm only. This option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-no-crtDo not add the C runtime to default deployment rules.Default value.
-qt-crtQt identifies C runtime during project generation
-crt <path>Specify path to C runtime used for project generation.
-no-cetestDo not compile Windows CE remote test application
-cetestCompile Windows CE remote test applicationThis option denotes a default value and needs to be evaluated. If the evaluation succeeds, the feature is included.
-signature <file>Use file for signing the target project
-phonon-wince-ds9Enable Phonon Direct Show 9 backend for Windows CEDefault value

Qt for Symbian OS only:

OptionDescriptionNote
-no-freetypeDo not compile in Freetype2 support.Default value.
-qt-freetypeUse the libfreetype bundled with Qt.
-fpu <flags>VFP type on ARM, supported options: softvfp(default) |vfpv2 | softvfp+vfpv2
-no-s60Do not compile in S60 support.
-s60Compile with support for the S60 UI FrameworkDefault value.
-no-usedeffilesDisable the usage of DEF files.
-usedeffilesEnable the usage of DEF files.
Notes provided by the Qt Community
Informative
  • 5

Votes: 6

Coverage: Qt library 4.7, 4.8, 5.0

Picture of sigrid sigrid

Lab Rat
20 notes

This person works for Qt Development Frameworks. Nokia Certified Qt Developer

Find out which options your Qt build was configured with

If you are using the source package, then you can find the options Qt was configured with in the configure.cache in your Qt directory. If the configure.cache file is empty, it means it used the default configuration options that can be seen when doing

  1. configure -help

on the command line. Otherwise, it will contain the configuration options that were passed into configure.

For the binary Qt package, then configure.cache is currently missing due to this issue [bugreports.qt.nokia.com]. Instead, you can take a look at the options listed in qconfig.pri which can be found in yourQtDirectory/mkspecs.

[Revisions]

Informative
  • 4

Votes: 1

Coverage: Qt library 4.7, 4.8, 5.0

Picture of sigrid sigrid

Lab Rat
20 notes

This person works for Qt Development Frameworks. Nokia Certified Qt Developer

Usage of the qtlibinfix and qtnamespace configuration options

See the following FAQ [developer.qt.nokia.com] for information on how to use the qtlibinfix and qtnamespace configuration options.

[Revisions]

Informative
  • 0

Votes: 0

Coverage: Qt library 4.7, 4.8, 5.0

Picture of Asperamanca Asperamanca

Robot Herder
5 notes

Correction

Some of the flags marked as “Windows only” work under Linux as well. I can’t provide a full list, but I definitely know -no-webkit and -no-script has an effect on Linux.

I assume the list you get when calling ./configure -h is correct.

[Revisions]