So allegedly, the configuration tool for Qt went through some changes, necessary to be able to make more streamlined Qt builds, a.k.a "Qt Lite". However, there doesn't seem to be any documentation about how to use that feature, or at least I don't find any, and looking at the comments from the release announcement, others can't neither.
What's more, the changes are definitely in there, judging by the fact that the configuration that I've been using for the last couple of years fails in a bunch of ways. I am not sure how up-to-date the built in help is, since the last time I tried using it for guidance, it turned out it was largely outdated and contained options that were no longer supported.
So it would be nice if someone could shed some light on what has changed and how, and how to configure for "Lite" builds. And especially on module and feature dependencies, because I think we'd all like to avoid wasting time on builds that will start building despite an improper configuration that omits necessary dependencies just to have it inevitably fail and result in nothing but a waste of time.
Per to the changelog:
Features for
-no-feature-*
lists are inqtbase\src\corelib\global\qfeatures.txt
.All features are enabled by default.
More information can be found in the Qt Lite Overview Presentation and its slides.
You can also use the new UI Tool which is known as Qt Configuration Tool and which is a part of Qt for Embedded Devices package - see its documentation. The configuration tool is available for commercial Qt customers only at the moment (Qt 5.8).
Everything that describes what the new configuration system understands is given in the
configure.json
files scattered around Qt modules. Theconfigure
tool uses these files to build a list of command line arguments it understands.Without the use of other tools, to learn about Qt features you need to inspect these json files and choose the features/options you wish turned on or off.
Sub Configurations
These act as includes, and refer to the
configure.json
file in a given folder. E.g.qtbase/configure.json
includesqtbase/src/corelib/configure.json
,qtbase/src/network/configure.json
etc.:Explicit Command Line Options
The
commandline/options
value lists theconfigure
options a given Qt module understands. These options are separate from the feature system, although they may be used for convenience to provide shorthand aliases that control features. For example, inqtbase/configure.json
, we have:This command line option controls the identically named
accessibility
feature. It is more convenient to use than dealing with the feature system's option[-no]-feature-accessibility
. The following pairs have identical effects:-accessibility
or-feature-accessibility
-no-accessibility
or-no-feature-accessibility
Values:
boolean
options are given toconfigure
as-option
and-no-option
, meaningtrue
andfalse
, respectively.-option value
.Feature Options
The
features
value lists the features available in a given module. The features are effectively booleans. They are all enabled by default, subject to passing configuration tests that enable them.To control a feature
foo
:-no-feature-foo
disables the feature. E.g. to disable theiconv
feature, you'd doconfigure -no-feature-iconv [...]
.-feature-foo
enables the feature and ensures that it is available. This will cause an error if a configuration test for the feature fails. It's useful in build systems that build a particularly configured Qt along with your application: it ensures that the features your code depends on will be available.Failing Builds
Generally speaking, no matter what combination of feature selections you provide, if
configure
doesn't fail, the build is supposed to succeed.The
configure
tool will detect any invalid configurations. Ifconfigure
succeeds yet the build fails, it's a Qt bug and you should report it.The changes that are behind my failed configuration:
there is no longer the option to specify whether sql support is built-in or plug-in, so the format is now just
-sql-<driver>
, the documentation is still not updated and lists the old format --<option>-sql-<driver>
.the
-l
option to add a specific library has been removed, which is turning out to be problematic in multiple areas.Edit: Also, this blog entry just posted on doing lite builds might be useful.