2011-07-05 01:37:55 +00:00
|
|
|
HOW TO BUILD QT5
|
|
|
|
================
|
2011-04-28 13:16:48 +00:00
|
|
|
|
|
|
|
|
2011-07-05 01:37:55 +00:00
|
|
|
Synopsis
|
|
|
|
========
|
2011-04-28 13:16:48 +00:00
|
|
|
|
2012-08-24 15:21:36 +00:00
|
|
|
System requirements
|
|
|
|
------------------
|
|
|
|
|
|
|
|
- Perl 5.8 or later
|
|
|
|
- Python 2.7 or later
|
2016-06-14 07:45:00 +00:00
|
|
|
- C++ compiler supporting the C++11 standard
|
2012-08-24 15:21:36 +00:00
|
|
|
|
|
|
|
For other platform specific requirements,
|
|
|
|
please see section "Setting up your machine" on:
|
2015-06-30 12:59:11 +00:00
|
|
|
http://wiki.qt.io/Get_The_Source
|
2012-08-24 15:21:36 +00:00
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
Licensing:
|
|
|
|
----------
|
|
|
|
|
|
|
|
Opensource users:
|
|
|
|
|
|
|
|
<license> = -opensource
|
|
|
|
|
|
|
|
Commercial users:
|
|
|
|
|
|
|
|
<license> = -commercial
|
|
|
|
|
2012-03-15 09:23:04 +00:00
|
|
|
Linux, Mac:
|
|
|
|
-----------
|
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
cd <path>/<source_package>
|
|
|
|
./configure -prefix $PWD/qtbase <license> -nomake tests
|
2012-09-18 19:02:32 +00:00
|
|
|
make -j 4
|
2012-03-15 09:23:04 +00:00
|
|
|
|
|
|
|
Windows:
|
|
|
|
--------
|
|
|
|
|
2016-06-14 07:52:06 +00:00
|
|
|
Open a command prompt.
|
|
|
|
Ensure that the following tools can be found in the path:
|
|
|
|
* Supported compiler (Visual Studio 2012 or later,
|
|
|
|
MinGW-builds gcc 4.9 or later)
|
2012-12-13 11:19:56 +00:00
|
|
|
* Perl version 5.12 or later [http://www.activestate.com/activeperl/]
|
|
|
|
* Python version 2.7 or later [http://www.activestate.com/activepython/]
|
|
|
|
* Ruby version 1.9.3 or later [http://rubyinstaller.org/]
|
2012-03-15 09:23:04 +00:00
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
cd <path>\<source_package>
|
|
|
|
configure -prefix %CD%\qtbase <license> -nomake tests
|
2012-09-18 19:02:32 +00:00
|
|
|
nmake // jom // mingw32-make
|
2012-03-15 09:23:04 +00:00
|
|
|
|
2012-09-18 19:02:32 +00:00
|
|
|
To accelerate the bootstrap of qmake with MSVC, it may be useful to pass
|
|
|
|
"-make-tool jom" on the configure command line. If you do not use jom,
|
|
|
|
adding "/MP" to the CL environment variable is a good idea.
|
2012-03-28 10:48:40 +00:00
|
|
|
|
2011-07-05 01:37:55 +00:00
|
|
|
More details follow.
|
2011-05-10 08:41:41 +00:00
|
|
|
|
2011-07-05 01:37:55 +00:00
|
|
|
Build!
|
|
|
|
======
|
|
|
|
|
|
|
|
A typical `configure; make' build process is used.
|
|
|
|
|
2012-03-15 09:23:04 +00:00
|
|
|
Some relevant configure options (see configure -help):
|
|
|
|
|
|
|
|
-release Compile and link Qt with debugging turned off.
|
|
|
|
-debug Compile and link Qt with debugging turned on.
|
|
|
|
-nomake tests Disable building of tests to speed up compilation
|
|
|
|
-nomake examples Disable building of examples to speed up compilation
|
|
|
|
-confirm-license Automatically acknowledge the LGPL 2.1 license.
|
|
|
|
|
2011-07-05 01:37:55 +00:00
|
|
|
Example for a release build:
|
|
|
|
(adjust the `-jN' parameter as appropriate for your system)
|
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
./configure -prefix $PWD/qtbase <license>
|
2011-07-05 01:37:55 +00:00
|
|
|
make -j4
|
|
|
|
|
2012-01-03 11:16:37 +00:00
|
|
|
Example for a developer build:
|
|
|
|
(enables more autotests, builds debug version of libraries, ...)
|
2011-07-05 01:37:55 +00:00
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
./configure -developer-build <license>
|
2011-07-05 01:37:55 +00:00
|
|
|
make -j4
|
|
|
|
|
|
|
|
See output of `./configure -help' for documentation on various options to
|
|
|
|
configure.
|
|
|
|
|
|
|
|
The above examples will build whatever Qt5 modules have been enabled by
|
|
|
|
default in the build system.
|
|
|
|
|
|
|
|
It is possible to build selected modules with their dependencies by doing
|
2016-06-14 07:55:03 +00:00
|
|
|
a `make module-<foo>'. For example, to build only qtdeclarative,
|
|
|
|
and the modules it depends on:
|
2011-07-05 01:37:55 +00:00
|
|
|
|
2015-10-02 08:12:03 +00:00
|
|
|
./configure -prefix $PWD/qtbase <license>
|
2016-06-14 07:55:03 +00:00
|
|
|
make -j4 module-qtdeclarative
|
2011-07-05 01:37:55 +00:00
|
|
|
|
|
|
|
This can save a lot of time if you are only interested in a subset of Qt5.
|
|
|
|
|
|
|
|
|
|
|
|
Hints
|
|
|
|
=====
|
|
|
|
|
2012-03-15 09:23:04 +00:00
|
|
|
The submodule repository qtrepotools contains useful scripts for
|
|
|
|
developers and release engineers. Consider adding qtrepotools/bin
|
|
|
|
to your PATH environment variable to access them.
|
2012-01-03 11:53:39 +00:00
|
|
|
|
2011-07-05 01:37:55 +00:00
|
|
|
The qt5_tool in qtrepotools has some more features which may be of interest.
|
|
|
|
Try `qt5_tool --help'.
|
2012-08-24 15:21:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
Building Qt5 from git
|
|
|
|
=====================
|
2015-06-30 12:59:11 +00:00
|
|
|
See http://wiki.qt.io/Building_Qt_5_from_Git and README.git
|
2012-08-24 15:21:36 +00:00
|
|
|
for more information.
|
2015-06-30 12:59:11 +00:00
|
|
|
See http://wiki.qt.io/Qt_5 for the reference platforms.
|
2013-01-23 11:33:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
=============
|
|
|
|
|
2013-07-05 12:55:14 +00:00
|
|
|
After configuring and compiling Qt, building the documentation is possible by running
|
2013-01-23 11:33:03 +00:00
|
|
|
"make docs".
|
|
|
|
|
2013-07-05 12:55:14 +00:00
|
|
|
After having built the documentation, you need to install it with the following
|
|
|
|
command:
|
|
|
|
|
|
|
|
make install_docs
|
2013-01-23 11:33:03 +00:00
|
|
|
|
|
|
|
The documentation is installed in the path set to $QT_INSTALL_DOCS.
|
|
|
|
Running "qmake -query" will list the value of QT_INSTALL_DOCS.
|
|
|
|
|
|
|
|
Information about Qt 5's documentation is located in qtbase/doc/README
|
2015-06-30 12:59:11 +00:00
|
|
|
or in the following page: http://wiki.qt.io/Qt5DocumentationProject
|
2013-01-23 11:33:03 +00:00
|
|
|
|
|
|
|
Note: Building the documentation is only tested on desktop platforms.
|