Commit Graph

91 Commits

Author SHA1 Message Date
Liang Qi
b131503361 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	configure.pri
	examples/widgets/painting/fontsampler/mainwindow.cpp
	examples/widgets/painting/fontsampler/mainwindow.h
	mkspecs/features/moc.prf
	src/corelib/global/qglobal.h
	src/gui/text/qtextdocument.cpp

Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
2016-12-16 16:38:33 +01:00
Jake Petroules
a3a8c24d6e Introduce the app store compliance configure option
QtWebEngine requires this in order to disable code that is not allowed
on the Mac App Store. The option is too generic to go directly into
QtWebEngine however, as it can be used to toggle additional features in
qtbase as well as on platforms other than macOS.

Change-Id: I556298f4b654a8904c33002ef097a75e2e38938e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-15 16:39:19 +00:00
Oswald Buddenhagen
ab0cc3055d move all target spec handling to qmake-based configure system
we pull this feat off by booting configure with a dummy spec. the proper
spec gets loaded subsequently.

note that it was necessary to move the cache loading after processing
the early checks (from which the spec handling is triggered). this is
just fine, as the cache is needed only by tests, which are forbidden at
this stage by definition.

Change-Id: I5120e25a8bf05fb8cc5485fd93cf6387301089aa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:34 +00:00
Oswald Buddenhagen
8861b82f9e move qdevice.pri creation to qmake-based configure system
Change-Id: I06540c3b6d98303bd9a218feedfb529993477ed6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:28 +00:00
Oswald Buddenhagen
169a40d511 move generation of qconfig.cpp (and qt.conf) to qmake-based configure
this moves us another step towards the "outer" configure doing just
minimal bootstrapping of qmake.

a challenge here was that so far, qmake itself needed qconfig.cpp. this
was replaced by usage of a qt.conf file instead of compiled-in values.
however, to make the executable still self-contained, that qt.conf is
embedded into it (by simple appending of a fixed signature and the text
file).

the qmake with the embedded qt.conf is not used for the qt build itself,
which instead relies on the qt.conf in bin/ as before. however, due to
the missing built-in values, this file now needs to contain more
information than before. but except for a minimal version that is needed
to start up qmake/configure at all, that file is now also generated with
qmake. as some of the newly set up properties are subsequently used by
configure itself, qmake gains a (deliberately undocumented) function to
reload the qt.conf after it's fully populated.

unlike the old implementations, this one doesn't emit redundant qt.conf
entries which match the hard-coded fallbacks. omitting them leads to
leaner files which are more comprehensible.

Started-by: Paolo Angelelli <paolo.angelelli@qt.io>
Change-Id: I4526ef64b3c89d9851e10f83965fe479ed7f39f6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:12 +00:00
Oswald Buddenhagen
42196f4061 nuke configure -host-option
in its current form, it was introduced only in 5.7, mostly as a side
effect of -external-hostbindir (which is now handled differently).
it only ever worked for the macOS and MinGW specs, as a side effect of
them supporting -sdk and -device-option (for good reasons), and was
supported only by the unix configure. it's not believed to be really
useful and complicates matters somewhat, so get rid of it again.

should it ever become actually relevant, it can be re-introduced
properly, probably along with a -host-sdk option for macOS.

Change-Id: Ib078469ea39deb821c7b6a8c67fda9e1a95fedf5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:59 +00:00
Oswald Buddenhagen
d004e086a2 move definition of configure -continue switch to builtins
... where it actually belongs, as it should work in each repo in a
modular build.

Change-Id: I5463f0bcacb239900bed0b0f7be9cf32a3eab04e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:37 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Oswald Buddenhagen
e2978d6097 move license check to qmake-based configure system
this also removes the need for passing pre-processed options via
configure.cfg, so get rid of that.

a somewhat unfortunate side effect is that the android-style-assets
feature had to move back to the top level, as the licensing options
depend on it.

Started-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: Id4d1e0ba18b3e3104400293b8f0c7f2f65e68dea
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-08 12:40:53 +00:00
Oswald Buddenhagen
6d2f7e9efe fix handling of -optimized-tools, take 2
amends dfbfc4915.

Change-Id: I5516f322fceee0d71c2e09b4314f38207b4ac630
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 09:38:00 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Oswald Buddenhagen
5c263bf984 configure: fix parsing of -hostprefix without argument
Change-Id: I94c0bc40e4f995d2c50bea828adcf8ed8bb96a90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:42 +00:00
Lars Knoll
7d4da559af Remove all Multimedia related configuration options from qtbase
They live in qtmultimedia now.

Change-Id: I1a2ee8be3efb7c4ee9a29d2a8e3fc1f3eea704fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 14:00:00 +00:00
Jake Petroules
e5fa635a97 iOS: Make default build static again (take 2)
amends aa3d08ee86, which attempted to
revert the default change to -shared in 4c26b48633 but failed to take
into account an explicitly passed -shared argument, resulting in:

ERROR: Feature 'shared' was enabled, but the pre-condition
'!config.uikit && !config.integrity' failed.

Change-Id: Ide381624245e7c132a07e98c9107be7126dd488a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-11-10 11:35:30 +00:00
Tor Arne Vestbø
aa3d08ee86 iOS: Make default build static again
This is a revert of the default change to -shared in 4c26b48633,
which was landed without dependent changes like
https://codereview.qt-project.org/#/c/160747/ being landed first,
breaking the build for people building with the default configure
arguments.

Change-Id: I66eba76ca681ccf9b2ee54fa16b3e08888ae2fb4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-09 13:39:18 +00:00
Oswald Buddenhagen
dfbfc4915b fix handling of -optimized-tools
this option makes sense only when the default build is debug (regardless
of whether the release build is also enabled), as it overrides the
default.

Change-Id: I29f87430242a7d8239f13f0b33f6eebe098d9cf7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:20 +00:00
Oswald Buddenhagen
4b1115742a invert the logic of the c++98 default test
this is much more intuitive, and actually produces a sensible result
with configure -recheck after a compiler upgrade.

Change-Id: Icfa0b85377d9fc014e66490c8ebf6c9236df978e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:06 +00:00
Jake Petroules
4c26b48633 Allow Qt for UIKit to be built as shared libraries and default to it
Instead of forcing a static build, configure now respects the
-shared flag and defaults to that.

[ChangeLog][Important Behavior Changes] Qt for iOS now respects the
-shared configure flag, and now defaults to this configuration as with
all other platforms.

Task-number: QTBUG-42937
Change-Id: I9e7b2de8f7f8ba031c2610ff5ac0858e357424bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-07 08:34:31 +00:00
Liang Qi
40a1f69e86 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure.json
	mkspecs/macx-tvos-clang/qmake.conf
	mkspecs/macx-watchos-clang/qmake.conf

Change-Id: Iaf32339ace59dff9ed344972472744c55d75025c
2016-09-15 19:47:57 +02:00
Lars Knoll
a668c6a6b6 Convert the old feature system
... to the new qmake based configuration system.

This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).

qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.

Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 08:24:10 +00:00
Oswald Buddenhagen
b754b2815d rename description => label in configure.json
"description" suggests something slightly longer.

this may seem like a gratuitous change, but the upcoming replacement of
the old feature system clarifies makes it seem much less so.

Change-Id: Ibe702e01cb146b59127bf1f990b4acaef1c61d55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:24:00 +00:00
Lars Knoll
2d3c73fcfe Modularize configure.json/.pri
Move the different parts of configure.json/.pri into the libraries where
they belong.

Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:23:53 +00:00
Lars Knoll
60e5a1c8ef Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.

This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.

When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.

When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.

Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.

This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.

The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.

qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-10 14:04:01 +00:00
Lars Knoll
137e690ac7 Turn the available sql drivers into public features
This is required to do the modularization of those
features properly.

Change-Id: I384aff20274e795aa70483980f0ef25309328800
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-10 14:03:50 +00:00
Jake Petroules
73331eebf8 Enable precompiled headers on iOS, tvOS, watchOS
The actual blocker for precompiled headers is not the iOS/tvOS/watchOS
platforms, but the way qmake handled multiple-architecture builds on
Apple platforms.

This patch allows multi-arch builds to be performed while using
precompiled headers.

Since df91ef3d6c55692a0236f67b6c6b134a3bf84098 (April 2009), Clang has
had support for PCH files in the driver, which allows to use the
-include flag to automatically translate to -include-pch. We can then
take advantage of the fact that the -include option is allowed to not
be separate from its argument, which lets us take advantage of -Xarch to
specify a per-architecture precompiled header file.

This is done through some magic in the qmake Makefile generator which
"multiplexes" the PCH creation rule across multiple architectures and
replaces a series of tokens with the proper precompiled header paths
and architecture flags at usage point.

Change-Id: I76c8dc9cda7e218869c2919f023d9b04f311c6fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-02 08:25:31 +00:00
Liang Qi
f510a51dac Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I843994939f126ced22f7fe978ec4403f599fc7c9
2016-08-31 08:24:21 +02:00
Oswald Buddenhagen
dbeca395b8 make 'angle' a public feature
the public win32/opengl.prf references it, so it must be public as well.

Change-Id: I95f6571bd3cdb7d35b2182bebf663e50140e065e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-26 14:28:05 +00:00
Oswald Buddenhagen
0f68ac2512 don't cache results of build_parts and skip_modules
as these tests do nothing but validating the command line, caching the
result is more confusing than anything else.

also make the tests silent, so they don't clutter an otherwise fully
cached configure run.

Change-Id: Ifc3d65278769b36a056650f077fd6274a7e192e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:59:15 +00:00
Jake Petroules
67884d5016 Don't compile widgets on tvOS and watchOS by default
Widgets is not particularly useful on tvOS without significant work due
to the focus model, and widgets is completely useless on watchOS except,
theoretically, a platform plugin which displays its UI over the network.

Widgets is not particularly nice on iOS either but is at least usable so
it remains enabled there.

This is sort of a revert of b4ebb61c0d,
except that this now simply turns off the feature by default rather than
disabling its use entirely.

Change-Id: Ice4215c344da4568792f8b5356e11367bde6828f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-22 13:51:06 +00:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Lars Knoll
a1c782062c Don't compile dbus on iOS by default
The library compiles, but is not usable on iOS, so don't
compile it by default on that platform.

Change-Id: I49b687b526a2998250ff5b57f1ea3df30cf8d7a5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-19 10:33:17 +00:00
Oswald Buddenhagen
8185fe84a6 fix up detection code for compiler defaulting to c++98
- remove the unconditional CONFIG+=c++11 from default_pre.prf, so the
  change actually has any effect
- fix up the description fields somewhat

this amends 091df96fb8, which was rushed in without maintainer review.

Change-Id: I88b859d6e2f0fe3d6a4771afe464a7c445e7b47b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 09:25:48 +00:00
Lars Knoll
3196527c1a Don't define QT_OPENGL_ES_2* in opengl.prf
Defining QT_OPENGL_ES_2 would only lead to conflicts with defines from
qconfig.h.
QT_OPENGL_ES_2_ANGLE also moves to the .pri.
QT_OPENGL_ES_2_ANGLE_STATIC is not used and is removed altogether.

Change-Id: I614fb00525ac696e066ac8328bb9bf61fca08a01
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:40 +00:00
Lars Knoll
fd89fb4566 Cleanup QT_NO_FONTCONFIG usage
Stop messing around with the define in pro files, and rely on
the configuration system. Disable fontconfig on Mac, which in practice
gives the same result as before.

Change-Id: Iea3aec127af96f221f4ee8682fb20a624332b82f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:30 +00:00
Lars Knoll
e33a382c33 Add a qeventtransition feature
This replaces the QT_NO_STATEMACHINE_EVENTFILTER define, and
gives it a proper name.

Change-Id: I2b9386458224ff2bd30003daac548daa61961085
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:26 +00:00
Lars Knoll
0a070d1e95 Don't use QT_NO_MIMETYPE in mimetypes.pri
Instead define a proper feature for it and use qtConfig().

Change-Id: I64b1d26b2419a24d3239e9935341b7d535990dfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:21 +00:00
Lars Knoll
cf166e5839 iconv-related cleanup in codecs.pri
The configuration system already takes care of setting QT_NO_ICONV.

Also move the platform conditions for using iconv from the pri file
to the .json.

Change-Id: I91b08bcee6799deddabcbb4a91d0a3f9ed7f0f28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:15 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Lars Knoll
48b4e0bf6f Improve library version handling
Output the version as a define into the private config header as
a define using a hex number. Like that we can easily do version checks
on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK()
macros.

Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:06 +00:00
Oswald Buddenhagen
4b288e30ef employ QMAKE_USE: LIBS += -lfoo
this switches all instances of LIBS[_PRIVATE] += -lfoo where a config
tests exists for foo.
this removes some code duplication between tests and project files (in
case of conditionals), and ensures that the projects always actually use
the libraries configure has found.

Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:43 +00:00
Oswald Buddenhagen
d5dc46d319 employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOO
this migrates the cases where the build system already made (some) use
of variables (possibly) set by configure.

Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:36 +00:00
Jake Petroules
b4ebb61c0d Don't disable QtWidgets on tvOS
There's no technical reason for this.

Change-Id: Ia57fcdfa83531155790bc4541f88479cd9d4a5a1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-08-18 22:31:02 +00:00
Lars Knoll
6903cad03e Make the ICO image format a configurable feature
... including a [-no]-ico command line option.

Change-Id: I3cb13d2be72b512f72f8dcdb9de72e7a99e36e47
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:57 +00:00
Oswald Buddenhagen
d90db0f136 rewrite makespec verification with qmake based system
cleaner, and covers windows as well.

Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-18 17:10:52 +00:00
Lars Knoll
97b856b788 Use the qmake based configuration system also on Windows
Adapt configure.exe to use qmake to do most of the work of configuring
Qt. This unifies a large part of our configuration system between Unix
and Windows. configure.exe is now still doing the license check,
creating qconfig.cpp, building qmake, and not much more.

On the way, re-implement the still missing Windows-specific tests with
the new system.

The opengles2 vs. opengl-desktop conditions got a bit convoluted, as
Unix prefers desktop GL, while Windows GLES2 (via ANGLE). Superficially,
there is a circular dependency, but the platform scopes are supposed to
break it.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Ia1941f2c34b7f5bd4990a7673cd737361381c2e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:47 +00:00
Oswald Buddenhagen
fd3e12e7a6 replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.

so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...

the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).

this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.

Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:25 +00:00
Lars Knoll
9172143f52 Add configure.exe-like FOO_LIBS=bar style command line options
Add the command line options supported by the windows version of
configure and respect them when running our configure tests.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I1206d60a177e251540d34d232c73c930847564b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:18 +00:00
Lars Knoll
98ddf9262e Revamp configure system for widget styles
Add [-no]-style-foo command line options for all widget styles, bringing
this closer in line with configure.exe. Add proper platform dependencies
and a configure test for the required uxtheme.h header on Windows. Clean
up and simplify styles.pri. Don't let configure.exe define QT_NO_STYLE_*
any more, as styles.pri does that locally anyway.

Change-Id: I81341f887a65b4e45e77380974eb79743acfad77
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:13 +00:00
Lars Knoll
c8b46d3989 Implement proper dependencies for configuration tests
Some test types (like the compile tests) require that other
features have been checked before, so that the compile test
sets up the right environment. Implement this through a
'testTypeDependencies' section in the json file that explicitly
encodes those dependencies for certain test types.

This replaces the 'priority' field in the feature list.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I70e7c67a4f2c971149bcac090cecbbe9cfff3f57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:09:57 +00:00
Oswald Buddenhagen
c0cc505209 rewrite library handling in configure
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.

libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.

as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
  shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional

the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.

on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).

Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:52 +00:00