Back to home page

QT Cross Reference

 
 

    


0001 HOW TO BUILD QT5
0002 ================
0003 
0004 
0005  Synopsis
0006  ========
0007 
0008    System requirements
0009    ------------------
0010 
0011     - Perl 5.8 or later
0012     - Python 2.7 or later
0013     - C++ compiler supporting the C++98 standard
0014 
0015      For other platform specific requirements,
0016      please see section "Setting up your machine" on:
0017      http://qt-project.org/wiki/Get_The_Source
0018 
0019    Optional requirements
0020    ---------------------
0021 
0022    - OpenSSL for SSL sockets or HTTPS
0023    - Wayland
0024 
0025    New dependencies in Qt 5
0026    ------------------------
0027 
0028      Linux: On systems running X11, the XCB libraries are required for
0029      the platform plugin to build. qtbase/src/plugins/platforms/xcb/README
0030      lists the required packages.
0031 
0032      Qt 5 can make use of the ICU libraries providing Unicode and Globalization
0033      support (see http://site.icu-project.org/). They are required for building
0034      QtWebKit.
0035      On Linux, they will be auto-detected.
0036      On Windows, they need to be manually installed and the "include" and "lib"
0037      folders of the ICU installation must be appended to the INCLUDE and LIB
0038      environment variables after calling the Windows SDK setup script.
0039      The "bin" folder of the ICU installation should be appended to the PATH
0040      environment variable in order to for the DLLs to be found at run-time.
0041 
0042    Linux, Mac:
0043    -----------
0044 
0045      cd <path>/qt-everywhere-opensource-src-<version>
0046      ./configure -prefix $PWD/qtbase -opensource -nomake tests
0047      make -j 4
0048 
0049    Windows:
0050    --------
0051 
0052      Open a Windows SDK (7.0, 7.1 or later) command prompt. Ensure that the
0053      following tools can be found in the path:
0054      * Perl version 5.12 or later   [http://www.activestate.com/activeperl/]
0055      * Python version 2.7 or later  [http://www.activestate.com/activepython/]
0056      * Ruby version 1.9.3 or later  [http://rubyinstaller.org/]
0057 
0058      cd <path>\qt-everywhere-opensource-src-<version>
0059      configure -prefix %CD%\qtbase -opensource -nomake tests
0060      nmake // jom // mingw32-make
0061 
0062      To accelerate the bootstrap of qmake with MSVC, it may be useful to pass
0063      "-make-tool jom" on the configure command line. If you do not use jom,
0064      adding "/MP" to the CL environment variable is a good idea.
0065 
0066  More details follow.
0067 
0068  Build!
0069  ======
0070 
0071  A typical `configure; make' build process is used.
0072 
0073  Some relevant configure options (see configure -help):
0074 
0075  -release              Compile and link Qt with debugging turned off.
0076  -debug                Compile and link Qt with debugging turned on.
0077  -nomake tests         Disable building of tests to speed up compilation
0078  -nomake examples      Disable building of examples to speed up compilation
0079  -confirm-license      Automatically acknowledge the LGPL 2.1 license.
0080 
0081  Example for a release build:
0082  (adjust the `-jN' parameter as appropriate for your system)
0083 
0084    ./configure -prefix $PWD/qtbase -opensource
0085    make -j4
0086 
0087  Example for a developer build:
0088  (enables more autotests, builds debug version of libraries, ...)
0089 
0090    ./configure -developer-build -opensource
0091    make -j4
0092 
0093  See output of `./configure -help' for documentation on various options to
0094  configure.
0095 
0096  The above examples will build whatever Qt5 modules have been enabled by
0097  default in the build system.
0098 
0099  It is possible to build selected modules with their dependencies by doing
0100  a `make module-<foo>'.  For example, to build only qtscript and qtwebkit,
0101  and the modules they depend on:
0102 
0103    ./configure -prefix $PWD/qtbase -opensource
0104    make -j4 module-qtscript module-qtwebkit
0105 
0106  This can save a lot of time if you are only interested in a subset of Qt5.
0107 
0108 
0109  Hints
0110  =====
0111 
0112  The submodule repository qtrepotools contains useful scripts for
0113  developers and release engineers. Consider adding qtrepotools/bin
0114  to your PATH environment variable to access them.
0115 
0116  The qt5_tool in qtrepotools has some more features which may be of interest.
0117  Try `qt5_tool --help'.
0118 
0119 
0120  Building Qt5 from git
0121  =====================
0122  See http://qt-project.org/wiki/Building-Qt-5-from-Git and README.git
0123  for more information.
0124  See http://qt-project.org/wiki/Qt-5 for the reference platforms.
0125 
0126 
0127  Documentation
0128  =============
0129 
0130  After configuring and compiling Qt, building the documentation is possible by running
0131  "make docs".
0132 
0133  After having built the documentation, you need to install it with the following
0134  command:
0135 
0136     make install_docs
0137 
0138  The documentation is installed in the path set to $QT_INSTALL_DOCS.
0139  Running "qmake -query" will list the value of QT_INSTALL_DOCS.
0140 
0141  Information about Qt 5's documentation is located in qtbase/doc/README
0142  or in the following page: http://qt-project.org/wiki/Qt5DocumentationProject
0143 
0144  Note: Building the documentation is only tested on desktop platforms.