/usr/share/qt5/doc/qtdoc/configure-options.html is in qt5-doc-html 5.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- configure.qdoc -->
<title>Qt Configure Options | QtDoc 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li><a href="index.html">Qt 5.2</a></li>
<li>Qt Configure Options</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#source-build-and-install-directories">Source, Build, and Install Directories</a></li>
<li class="level1"><a href="#including-and-excluding-qt-modules">Including and Excluding Qt Modules</a></li>
<li class="level2"><a href="#excluding-a-qt-submodule">Excluding a Qt Submodule</a></li>
<li class="level2"><a href="#including-or-excluding-features">Including or Excluding Features</a></li>
<li class="level1"><a href="#third-party-libraries">Third-Party Libraries</a></li>
<li class="level1"><a href="#compiler-options">Compiler Options</a></li>
<li class="level1"><a href="#cross-compilation-options">Cross-Compilation Options</a></li>
<li class="level2"><a href="#specific-options-for-platforms">Specific Options for Platforms</a></li>
<li class="level1"><a href="#opengl-options-for-windows">OpenGL Options for Windows</a></li>
</ul>
</div>
<h1 class="title">Qt Configure Options</h1>
<span class="subtitle"></span>
<!-- $$$configure-options.html-description -->
<div class="descr"> <a name="details"></a>
<p><tt>configure</tt> is a command-line tool which determines how to build Qt for a particular platform. Configure can exclude a feature in Qt as well as determine how Qt builds and deploys applications onto host platforms. This page discusses some of the configure options, but for the full list of options, enter the command <tt>configure -h</tt>. Configure is located in <i>qtbase</i> but is also available from the main Qt source directory.</p>
<p>Unless stated otherwise, the commands in this page are for the Linux platforms. On Mac OS X and on Windows, the <tt>PATH</tt> and directory structure are different, therefore the commands will vary. Also, on Windows systems, the configure script is called <i>configure.bat</i>.</p>
<p>After running <tt>configure</tt>, build the sources with the <tt>make</tt> tool belonging to the chosen toolchain.</p>
<a name="source-build-and-install-directories"></a>
<h2>Source, Build, and Install Directories</h2>
<p>With configure, it is possible to configure Qt to install to a different directory than the source directory or the build directory. The <i>source</i> directory contains the source code and it is obtained from the source package. The <i>build</i> directory is where the build related files such as Makefiles, object files, and other intermediate files are stored. The <i>install</i> directory is where the binaries and libraries are installed, for use either by the system or by the application.</p>
<p>It is often convenient to use a <i>shadow build</i>, when the build directory is not the same as the source directory. This method allows the source directory to be free from intermediate or generated files, and allows for multiple simultaneous builds with different configurations. To shadow-build, run <tt>configure</tt> from a separate directory:</p>
<pre class="cpp">mkdir <span class="operator">~</span><span class="operator">/</span>qt<span class="operator">-</span>build
cd <span class="operator">~</span><span class="operator">/</span>qt<span class="operator">-</span>build
<span class="operator">~</span><span class="operator">/</span>qt<span class="operator">-</span>source<span class="operator">/</span>configure</pre>
<p>The Makefiles are at <i>~/qt-build</i> and not in the source directory.</p>
<p>After building, it may be necessary to install the libraries and binaries into the install directory. The default for the installation directory depends on the platform; <tt>configure</tt>'s output mentions it. To modify the installation directory, use the <tt>-prefix</tt> option:</p>
<pre class="cpp"><span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>prefix <span class="operator">/</span>opt<span class="operator">/</span><span class="type"><a href="../qtcore/qt.html">Qt</a></span><span class="operator">-</span><span class="number">5.1</span></pre>
<p>The installation directory serves as the parent directory of the <i>bin</i>, <i>lib</i>, and other installed Qt subdirectories.</p>
<p>It is possible to set the install directory to the same directory as the build directory (this is termed a <i>non-prefix</i> build). In this case, Qt can be used straight out of the build directory, and <i>must</i> <i>not</i> be installed. This is the default under Windows, and when Qt is configured with the <tt>-developer-build</tt> option.</p>
<p><b>Note: </b>When you are explicitly requesting a non-prefix configuration for a top-level build of Qt (all modules at once), set the prefix to <tt>$builddir/qtbase</tt>, not <tt>$builddir</tt>.</p><a name="including-and-excluding-qt-modules"></a>
<h2>Including and Excluding Qt Modules</h2>
<p>With configure, it is possible to include or exclude particular <a href="qtmodules.html">Qt modules</a> in a Qt build. However, keep in mind that many modules depend on other modules, therefore, dependency issues can arise with some build configurations.</p>
<a name="excluding-a-qt-submodule"></a>
<h3>Excluding a Qt Submodule</h3>
<p>Configure's <tt>-skip</tt> option allows certain Qt submodules to be excluded from the Qt build. These submodules correspond to the Git submodules in the standard Qt 5 repository. Note that many packages contain multiple Qt modules. For example, to exclude Qt NFC and Qt Bluetooth from the Qt build, provide <tt>-skip qtconnectivity</tt> as the argument to configure.</p>
<pre class="cpp"><span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>skip qtconnectivity</pre>
<a name="including-or-excluding-features"></a>
<h3>Including or Excluding Features</h3>
<p>The <tt>-feature-</tt><i><feature></i> and <tt>-no-feature-</tt><i><feature></i> options include and exclude specific features, respectively, where <i><feature></i> is listed in the file <i>qtbase/src/corelib/global/qfeatures.txt</i>.</p>
<p>For example, to disable <a href="accessible.html">Accessibility</a>, provide <tt>-no-feature-accessibility</tt> as the argument:</p>
<pre class="cpp"><span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>no<span class="operator">-</span>feature<span class="operator">-</span>accessibility</pre>
<p><b>Note: </b>Features outside of <i>qtbase</i> are not included in the features list.</p><a name="third-party-libraries"></a>
<h2>Third-Party Libraries</h2>
<p>The Qt source packages include third-party libraries. To set whether Qt should use the system's versions of the libraries or to use the bundled version, pass either <tt>-system</tt> or <tt>-qt</tt> before the name of the library to configure.</p>
<p>The table below summarizes the third-party options:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Library Name</th><th >Bundled in Qt</th><th >Installed in System</th></tr></thead>
<tr valign="top" class="odd"><td >zlib</td><td ><tt>-qt-zlib</tt></td><td ><tt>-system-zlib</tt></td></tr>
<tr valign="top" class="even"><td >libjpeg</td><td ><tt>-qt-libjpeg</tt></td><td ><tt>-system-libjpeg</tt></td></tr>
<tr valign="top" class="odd"><td >libpng</td><td ><tt>-qt-libpng</tt></td><td ><tt>-system-libpng</tt></td></tr>
<tr valign="top" class="even"><td >xcb</td><td ><tt>-qt-xcb</tt></td><td ><tt>-system-xcb</tt></td></tr>
<tr valign="top" class="odd"><td >xkbcommon</td><td ><tt>-qt-xkbcommon</tt></td><td ><tt>-system-xkbcommon</tt></td></tr>
<tr valign="top" class="even"><td >freetype</td><td ><tt>-qt-freetype</tt></td><td ><tt>-system-freetype</tt></td></tr>
<tr valign="top" class="odd"><td >PCRE</td><td ><tt>-qt-pcre</tt></td><td ><tt>-system-pcre</tt></td></tr>
<tr valign="top" class="even"><td >HarfBuzz-NG (experimental)</td><td ><tt>-qt-harfbuzz</tt></td><td ><tt>-system-harfbuzz</tt></td></tr>
</table>
<p>It is also possible to disable support for these libraries by using <tt>-no</tt> instead of <tt>-qt</tt>. For example, to use the system's xcb library and disable zlib support, enter the following:</p>
<pre class="cpp"><span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>no<span class="operator">-</span>zlib <span class="operator">-</span>qt<span class="operator">-</span>libjpeg <span class="operator">-</span>qt<span class="operator">-</span>libpng <span class="operator">-</span>system<span class="operator">-</span>xcb</pre>
<p>For a full list of options, consult the help with <tt>configure -help</tt>.</p>
<a name="compiler-options"></a>
<h2>Compiler Options</h2>
<p>The <tt>-platform</tt> option sets the host platform and the compiler for building the Qt sources. The list of supported platforms and compilers is found in the <a href="supported-platforms.html">Supported Platforms</a> page while the full list is listed in <i>qtbase/mkspecs</i>.</p>
<p>For example, on Ubuntu Linux systems, Qt can be compiled by several compilers such as clang or g++:</p>
<pre class="cpp"><span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>platform linux<span class="operator">-</span>clang
<span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>platform linux<span class="operator">-</span>g<span class="operator">+</span><span class="operator">+</span>
<span class="operator">.</span><span class="operator">/</span>configure <span class="operator">-</span>platform linux<span class="operator">-</span>g<span class="operator">+</span><span class="operator">+</span><span class="operator">-</span><span class="number">32</span></pre>
<p>For <a href="windows-support.html">Windows</a> machines, either <a href="http://www.mingw.org/">MinGW</a> or Visual Studio toolchains can be used to compile Qt.</p>
<pre class="cpp">configure<span class="operator">.</span>bat <span class="operator">-</span>platform win32<span class="operator">-</span>g<span class="operator">+</span><span class="operator">+</span>
configure<span class="operator">.</span>bat <span class="operator">-</span>platform win32<span class="operator">-</span>msvc2010</pre>
<p>Afterwards, the generated Makefiles will use the appropriate compiler commands.</p>
<a name="cross-compilation-options"></a>
<h2>Cross-Compilation Options</h2>
<p>To configure Qt for cross-platform development and deployment, the development toolchain for the target platform needs to be set up. This set up varies among the <a href="supported-platforms.html">Supported Platforms</a>.</p>
<p>Common options are:</p>
<ul>
<li><tt>-xplatform</tt> - the target platform. Valid xplatform options are the same as the <tt>-platform</tt> options which are found in <i>qtbase/mkspecs</i>.</li>
<li><tt>-device</tt> - a specific device or chipsets. The list of devices that configure is compatible with are found in <i>qtbase/mkspecs/devices</i>. For more information, visit the <a href="http://qt-project.org/wiki/Category:Devices">Devices</a> Wiki page.</li>
<li><tt>-device-option</tt> - sets additional qmake variables. For example, <tt>-device-option CROSS_COMPILE=</tt><i><path-to-toolchain></i> provides the environment variable, <tt>CROSS_COMPILE</tt>, as needed by certain devices.</li>
</ul>
<p><b>Note: </b>Toolchains for non-desktop targets often come with a so-called <i>sysroot</i> which Qt needs to be configured against.</p><a name="specific-options-for-platforms"></a>
<h3>Specific Options for Platforms</h3>
<p>The following pages provide guidelines on how to configure Qt for specific platform development:</p>
<ul>
<li><a href="http://qt-project.org/wiki/Qt5ForAndroidBuilding">Building Qt 5 for Android</a> Wiki page</li>
<li><a href="ios-support.html">iOS</a></li>
<li><a href="http://qt-project.org/wiki/BlackBerry">Qt for BlackBerry</a> - a community-driven site for <a href="../qtmultimedia/blackberry.html">BlackBerry</a> and QNX devices</li>
<li><a href="http://qt-project.org/wiki/Qt-RaspberryPi">Qt for Raspberry Pi</a> - a community-driven site for Raspberry devices</li>
<li><a href="http://qt-project.org/wiki/Category:Devices">Devices</a> - a list of other devices and chipsets</li>
</ul>
<a name="opengl-options-for-windows"></a>
<h2>OpenGL Options for Windows</h2>
<p>On Windows, Qt can be configured with the system <a href="../qtopengl/opengl-module.html">OpenGL</a> or with <a href="http://code.google.com/p/angleproject/">ANGLE</a>. By default, configure uses ANGLE, which is bundled with the Qt sources, but requires the DirectX SDK. Through ANGLE, <a href="../qtopengl/opengl-module.html">OpenGL</a> ES 2.0 is mapped to DirectX APIs. <a href="../qtopengl/opengl-module.html">OpenGL</a> applications can then be deployed to Windows computers with older <a href="../qtopengl/opengl-module.html">OpenGL</a> APIs, without requiring that the latest <a href="../qtopengl/opengl-module.html">OpenGL</a> version be installed in the system.</p>
<p>The <tt>-opengl</tt> option configures Qt to use the <a href="../qtopengl/opengl-module.html">OpenGL</a> in the target system or a different version of <a href="../qtopengl/opengl-module.html">OpenGL</a> ES.</p>
<pre class="cpp">configure<span class="operator">.</span>bat <span class="operator">-</span>opengl desktop</pre>
<p>With the <tt>desktop</tt> option, Qt uses the <a href="../qtopengl/opengl-module.html">OpenGL</a> installed in Windows, requiring that the <a href="../qtopengl/opengl-module.html">OpenGL</a> in the target Windows machine is compatible with the application. The <tt>-opengl</tt> option accepts two versions of <a href="../qtopengl/opengl-module.html">OpenGL</a> ES, <tt>es2</tt> for <a href="../qtopengl/opengl-module.html">OpenGL</a> ES 2.0 or <tt>es1</tt> for <a href="../qtopengl/opengl-module.html">OpenGL</a> ES Common Profile.</p>
<pre class="cpp">configure<span class="operator">.</span>bat <span class="operator">-</span>opengl es2</pre>
</div>
<!-- @@@configure-options.html -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|