Qt5 super module
Go to file
Alexandru Croitor 2c9664ca33 CMake: Integrate init-repository with the configure script
Calling configure will now implicitly run init-repository when
appropriate. See further down below for what "appropriate" means.

All supported init-repository options can be passed to configure as
except for -mirror, -oslo, -berlin.

This includes useful options like -submodules, -no-resolve-deps and
-no-optional-deps.

When running configure on a qt5.git clone without any submodules
cloned, configure will exit with a helpful error message suggesting to
pass -init-submodules, so it automatically clones missing repositories.
This means cloning is opt-in, so that internet access is not done
implicitly.

The error message also suggests passing the -submodules option.
This will affect which submodules will be cloned by init-repository
and which submodules will be configured by configure.
In this case -submodules is effectively an alias of
init-repository's -module-subset for cloning purposes.

When calling configure a second time, without -init-submodules, on an
already configured repo, init-repository behavior is entirely skipped.

-submodules now accepts init-repository-style special values like
"essential", "addon", "all", "existing", "-deprecated" for the purpose
of cloning submodules. The values are then translated into actual repos
that should also be configured or skipped by configure.

The default subset of cloned submodules is currently the same one as
init-repository, "default", which clones 44 actively maintained
repositories as well as deprecated submodules.

If configure is called a second time WITH -init-submodules, it's the
same as calling init-repository --force to re-initialize submodules.
In this case passing something like
 --submodules existing,<additional-submodules>
might make sense to add or remove submodules.

As a drive-by this also fixes the bug where you couldn't pass a
  configure -- -DFOO=0
parameter to configure, because it got treated as '0>', redirecting
from a different stream than stdout, leading to empty content in the
file.

[ChangeLog][General][Build System] The configure script now implicitly
calls init-repository when appropriate and accepts init-repository
command line options.

Fixes: QTBUG-120030
Task-number: QTBUG-122622
Change-Id: Iedbfcbf0a87c8ee89e40d00b6377b68296a65a62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-28 06:24:02 +01:00
.github Doc: Create a CONTRIBUTING.md file 2023-12-12 06:17:16 +00:00
LICENSES Add license directory and update remaining license format in coin 2023-09-02 13:58:24 +02:00
cmake CMake: Integrate init-repository with the configure script 2024-02-28 06:24:02 +01:00
coin Add a ubuntu lcov nightly configuration 2024-02-27 06:14:46 +01:00
qt3d@30776960db Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qt5compat@c2f49b9db5 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtactiveqt@a74633ca86 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtbase@364e1c5f30 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtcanvas3d@1319e0965f Update submodules on 'dev' in qt5 2019-01-11 07:40:26 +00:00
qtcharts@df900cebab Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtcoap@dc2f091cee Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtconnectivity@d90a294146 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtdatavis3d@39aaac4dc1 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtdeclarative@db5eefc33c Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtdoc@2300c7ca44 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtfeedback@9ac8d8c272 Updated submodules. 2016-06-28 15:58:12 +00:00
qtgamepad@5fe6fd206f Update submodules on 'dev' in qt/qt5 2019-10-26 14:01:00 +02:00
qtgraphs@ce1da90f18 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtgrpc@cffa433422 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qthttpserver@b752273b9c Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtimageformats@d99033517a Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtlanguageserver@e39846fda9 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtlocation@774a44208b Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtlottie@b1c32001d7 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtmqtt@ac0bcc66f8 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtmultimedia@e8f88cc506 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtnetworkauth@f87cd7fa7a Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtopcua@a35123fcd8 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtpim@02efef5ee6 Updated submodules. 2016-06-28 15:58:12 +00:00
qtpositioning@4df59ee414 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtqa@a5b680b919 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtquick3d@61124cbbbb Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtquick3dphysics@0e9ff1637a Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtquickeffectmaker@cd990f7645 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtquicktimeline@f92cd3f877 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtremoteobjects@7b7b454a81 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtrepotools@130826c46e Update submodules on 'dev in qt/qt5' 2024-02-16 07:31:29 +02:00
qtscxml@7959905c4f Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtsensors@722c5abd6d Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtserialbus@eebcaf7bbb Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtserialport@3234a30f79 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtshadertools@d7ede2c75f Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtspeech@581370e256 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtsvg@4545854924 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtsystems@434af789f0 Updated submodules. 2016-06-28 15:58:12 +00:00
qttools@2d04db99f5 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qttranslations@687c04a08c Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtvirtualkeyboard@9df444d438 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtwayland@9b9dc62dd7 Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtwebchannel@9fdc1c30cc Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtwebengine@2d42f4d15d Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtwebglplugin@531fb30d53 Update submodules on 'dev' in qt/qt5 2019-10-26 14:01:00 +02:00
qtwebsockets@ed5d76585e Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtwebview@a99fb1d6ac Update submodules on 'dev in qt/qt5' 2024-02-26 17:08:41 +00:00
qtxmlpatterns@05ab444844 Update submodules on 'dev' in qt/qt5 2019-10-26 14:01:00 +02:00
tests/manual/RunCMake CMake: Add a test for init-repository 2024-02-28 06:23:50 +01:00
.commit-template Add Pick-to footer for cherry-pick bot to commit template 2020-04-20 11:04:27 +02:00
.gitattributes Turn off line ending conversion for .commit-template 2017-07-21 05:44:28 +00:00
.gitignore CMake: Integrate init-repository with the configure script 2024-02-28 06:24:02 +01:00
.gitmodules Make qtmultimedia a hard dependency for qtspeech 2023-10-09 14:21:11 +02:00
.tag Update the git-archive export options 2012-09-05 14:33:37 +02:00
CMakeLists.txt CMake: Integrate init-repository with the configure script 2024-02-28 06:24:02 +01:00
CONTRIBUTING.md Doc: Create a CONTRIBUTING.md file 2023-12-12 06:17:16 +00:00
README.git Update README.git to mention Qt 6 2022-06-23 08:18:48 +02:00
README.md README.md 'Linkify' README.git 2024-01-07 12:13:36 +01:00
README.md.template Doc: Create README template 2023-09-23 10:27:29 +02:00
_clang-format Add .proto files format to _clang-format 2023-09-11 09:03:26 +02:00
configure CMake: Integrate init-repository with the configure script 2024-02-28 06:24:02 +01:00
configure.bat CMake: Integrate init-repository with the configure script 2024-02-28 06:24:02 +01:00
configure.json automatically launch new configure system in top-level builds 2016-09-15 06:52:35 +00:00
init-repository CMake: Rewrite init-repository using CMake and .sh / .bat scripts 2024-02-28 06:23:36 +01:00
init-repository.bat CMake: Rewrite init-repository using CMake and .sh / .bat scripts 2024-02-28 06:23:36 +01:00
init-repository.pl CMake: Rename init-repository script to make space for cmake script 2024-02-28 06:23:32 +01:00

README.md

HOW TO BUILD Qt 6

Synopsis

System requirements

  • C++ compiler supporting the C++17 standard
  • CMake
  • Ninja
  • Python 3

For more details, see also https://doc.qt.io/qt-6/build-sources.html

Linux, Mac:

cd <path>/<source_package>
./configure -prefix $PWD/qtbase
cmake --build .

Windows:

  1. Open a command prompt.
  2. Ensure that the following tools can be found in the path:
cd <path>\<source_package>
configure -prefix %CD%\qtbase
cmake --build .

More details follow.

Build!

Qt is built with CMake, and a typical configure && cmake --build . build process is used.

If Ninja is installed, it is automatically chosen as CMake generator.

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.

Example for a release build:

./configure -prefix $PWD/qtbase
cmake --build .

Example for a developer build: (enables more autotests, builds debug version of libraries, ...)

./configure -developer-build
cmake --build .

See output of ./configure -help for documentation on various options to configure.

The above examples will build whatever Qt modules have been enabled by default in the build system.

It is possible to build selected repositories with their dependencies by doing a ninja <repo-name>/all. For example, to build only qtdeclarative, and the modules it depends on:

./configure
ninja qtdeclarative/all

This can save a lot of time if you are only interested in a subset of Qt.

Hints

The submodule repository qtrepotools contains useful scripts for developers and release engineers. Consider adding qtrepotools/bin to your PATH environment variable to access them.

Building Qt from git

See http://wiki.qt.io/Building_Qt_6_from_Git and README.git for more information. See http://wiki.qt.io/Qt_6 for the reference platforms.

Documentation

After configuring and compiling Qt, building the documentation is possible by running

cmake --build . --target docs

After having built the documentation, you need to install it with the following command:

cmake --build . --target install_docs

The documentation is installed in the path specified with the configure argument -docdir.

Information about Qt's documentation is located in qtbase/doc/README

Note: Building the documentation is only tested on desktop platforms.