Commit Graph

41 Commits

Author SHA1 Message Date
Oswald Buddenhagen
815a41f714 make use of silent error() emission
get rid of the entirely superfluous stock "Aborting." messages -
the event triggering the exit has already reported the problem.

Change-Id: Ib9dfb9e4212f60eceb2ea432cdf56c5a8afe9d65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-08 09:48:41 +00:00
Maurice Kalinowski
34e0e908c8 winrt: Add capabilities as specified by modules
So far no capabilities (but internetClient for Windows 10) were added by
default, which forced developers to always manually edit the
WINRT_MANIFEST.capabilities(_device) property.

This allowed to leave out non-required capabilities and keep the created
manifest clean, examples being microphone for multimedia.

However, this also breaks first user experience as deeper knowledge
about this topic is required. Furthermore this is inconsistent with
other platforms like Android, where all capabilities are set by default
and developers need to edit the manifest manually in any case.
With this change, modules can define the capability set to enable all
features in the module. If developers want to disable some again, they
need to adapt the generated manifest. From our experience this needs to
be done in any case, latest at publishing stage when the store
manipulates the manifest.

Task-number: QTBUG-38802
Change-Id: I6d522268ee0afbfa00a30dbdd5e6ec9f415bebf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-07 20:03:55 +00:00
Frederik Gladhorn
6380cc710e Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: Iac8ff05cd76cbacf859138a73e8e2ed0a979c75a
2016-03-17 16:02:45 +01:00
Oswald Buddenhagen
a51085fc68 export private module's deps as run deps of the public module
this is necessary for:
- generating -rpath-link arguments when link_prl is not used. link_prl
  is enabled by default, so this has no effect on most projects.
- deployment purposes, which is hypothetical as of now.

Change-Id: I9e629f3eef93c4edf12efc016ecc27dbe2186d61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-03-07 14:09:41 +00:00
Oswald Buddenhagen
3bcc303711 fix non-git non-prefix shadow builds
turns out we need forwarding .pris in this case: without them,
QT_MODULE_INCLUDE_BASE points into the build dir, so we fail to find the
pre-generated headers.

an alternative would be writing primary module .pris which already take
that into account, but that would just add even more arcane code paths.

Task-number: QTBUG-51521
Change-Id: I59f2a0d3f2095c9dfa0a8d1cabfc007a30bd2d23
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-02 11:06:39 +00:00
Oswald Buddenhagen
b8bee40726 unbreak propagation of dependencies on private modules
most module project files define two logical modules: a public one and
the corresponding private one. these are really separate modules as far
as qmake is concerned (even though the private one contains just
headers), and consequently have separate dependencies - QT and
QT_FOR_PRIVATE.

as public modules cannot depend on private ones, all private
dependencies would have to go to QT_FOR_PRIVATE, and a dependency on the
respective public module would have to be added to QT. this would be a
bit tedious, so we have a convenience feature which allows putting
private dependencies into QT, but automatically "downgrades" them to
their public counterpart when creating the public module's .pri file.

however, we failed to put verbatim versions of these private
dependencies into the private modules, which meant that these
dependencies were not pulled in transitively by the private modules'
users.

note that this entirely unrelated to QT_PRIVATE - this one defines the
private (non-propagated) dependencies of the module's implementation,
i.e., the libraries (and headers) that are not part of the link
interface. there is no QT_PRIVATE_FOR_PRIVATE, because there is
obviously no point in assigning the dependencies to a particular
logical submodule when neither one inherits them as far as the qt
module system is concerned.

Change-Id: Ib056b47dde3341ef9a52ffff13efaf8ef8e6817b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-01-13 15:59:05 +00:00
Oswald Buddenhagen
dc1f65d4cf make module .pri files more flexible
save the actual library/framework name and framework paths in the .pri
file instead of computing them again at use time in qt.prf.

qt_no_framework_direct_includes inherently requires a use-time decision,
so this ugliness remains.

Change-Id: I09b2775e7d8e1d52e3af0d663e1babde10ae4814
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-13 15:59:00 +00:00
Oswald Buddenhagen
20c7ab44c6 rework include path construction in the module system
the main objective was to fix the bootstrap modules in framework builds.
bootstrapped modules which "borrow" headers from "proper" modules can
specify this in a clean way now.
a side effect of this is that the bootstrap-dbus module now has its own
syncqt call.

most includepath-related setup from qt_module_pris.prf was moved to
qt_module_headers.prf.

Change-Id: Ie0d8192cfac1a8cdae0ddd0bc0cd8c3092b1e85b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-12 15:14:57 +00:00
Oswald Buddenhagen
2e6754d942 fix the determination whether to build a module as a framework
CONFIG+=qt_framework is actually put into qconfig.pri, so it's always
set in framework builds. things (sometimes) worked only by virtue of the
qt_framework checks being in "else" branches of "static" checks. use
lib_bundle instead, which triggers the actual framework build anyway.

amends b72d1db44.

Change-Id: Ib725c43476d9fb38bad940ce09905d29ff3edfa3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-11-19 20:21:25 +00:00
Oswald Buddenhagen
b72d1db446 centralize determination whether a module is built as a framework
Change-Id: Ie5f8ab6bb789536707050f0fd83b953650028cf2
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-11-17 20:22:33 +00:00
Oswald Buddenhagen
e853edd657 simplify qt rpath code
the rpath applies only to the installed on-device location and is
consequently always the same for all modules, so there is no point in
indirections.

Change-Id: Ia0590552aa317d799a2d3879fd0c0768344b9645
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-17 16:36:08 +00:00
Oswald Buddenhagen
d88df1ca6a allow modules to declare that they have generated private includes
Change-Id: Ifbd561aab9c6a6634930b525aa1d51b9ad792a09
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-05-20 18:11:48 +00:00
Oswald Buddenhagen
0823e3f746 make headers-only modules work for framework builds
Change-Id: I00125883335c5b8cc556b4e4c964e11c55aa989b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-27 18:58:50 +00:00
Oswald Buddenhagen
497974abe3 don't try to include non-existing private module .pri
amends b8f79e7095.

Change-Id: If4358634a66947d7644224466b239e470d15afda
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:05:56 +00:00
Oswald Buddenhagen
b8f79e7095 make it possible to suppress the creation of a private module
while every "real" module has private headers, a very small headers-only
module could reasonably have none. entirely hypothetically, of course. ;)

Change-Id: Ib51a66858fb7d62f45fe2928625c25aa1ffc2827
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-27 13:29:45 +00:00
Oswald Buddenhagen
6037198f6d export modules with TEMPLATE=aux as no_link
they have no library to link against, obviously.

Change-Id: I721670382c1ec56e19130f0a0ecef616e101b885
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-27 13:29:43 +00:00
Oswald Buddenhagen
b6f0060f60 support spaces in build and install dirs
spaces in the source dir are not supported for now, as that requires
some more profound refactoring of the bootstrap makefiles.

Change-Id: Ie0c07a1558b8326f642f2ea144bc1cd85ee761af
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:28:00 +00:00
Oswald Buddenhagen
1043bf202b introduce /dev variants of qmake properties
these reflect the on-target paths (unlike /raw, which are host paths, just
without the -sysroot). this is necessary for anything deployment-related,
starting with RPATH.

Change-Id: I13d598995d0e4d6cb0dc1fc7938b8631cf3e3a95
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-05 14:27:06 +00:00
Thiago Macieira
fe6f4b9ad7 Fix linking of sources without LTCG to a static lib with LTCG
Whenever a binary is created and linked against a static lib that was
compiled with LTCG, the final linking step requires the compiler flags
so that the pre-compiled data in the shared library can get properly
compiled.

This could happen for a static build of Qt with LTCG, but also happens
frequently for Qt's own build when linking regular libraries and
applications against QtBootstrap or QtPlatformSupport. The linking fails
when the target is a shared library (example: QtWaylandClient linking
against QtPlatformSupport).

The .prl file actually contains the "ltcg" flag, so the best solution
would actually be to process that flag there and add link_ltcg if any
dependent .prl has "ltcg", but I couldn't find out how to do that.

Change-Id: I4a75a14d1dcb8c2089a427285e25d5555df7d7d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-12-01 21:33:31 +01:00
Oswald Buddenhagen
e1ff27ca28 add support for explicitly declaring the module master header
when a module delegates to another module (as the activeqt ones do), it
doesn't have a master header to be included. we could derive the real
master header by doing a transitive dependency resolution and some
filtering, but that seems unnecessarily complex.

Task-number: QTBUG-41892
Change-Id: Ie7ce51a837ac06e929b204ec734206c11b3ae241
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-10-29 09:37:08 +01:00
Oswald Buddenhagen
daa847afe3 make module-by-module build work when old builds are installed
when doing a module-by-module build, we need to also use includes and
libraries from the install tree, as it contains the current module's
dependencies. but a pre-existing installation of the current module must
not be found first, as it would cause trouble latest when it was somehow
incompatible.

but purely topological sorting of the dependencies could cause the
locations to be mixed up. therefore we give modules which are part of
the current build a priority boost.

Change-Id: I8fdbb46f0a2a630781c8a2177468039c1122151a
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-30 10:32:12 +02:00
Oswald Buddenhagen
91ef3966bd fix list of cached module variables
makes configure -fully-process less broken.

Change-Id: I7d22898b1e6994eb46359afca3fc4ad08e334946
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-04-30 16:56:29 +02:00
Oswald Buddenhagen
4255ba40ab automatically link plugins belonging to qt modules when building static apps
the plugins already declare which modules they belong to.
additionally, we allow plugins to declare which modules they "extend" -
e.g., while the Quick accessibility plugin belongs to Gui's 'accessiblity'
type, it makes no sense to link it unless Quick is actually linked.
finally, it is possible to manually override the plugins which are linked
for a particular type, by setting QTPLUGIN.<type> (to '-' if no plugins
of this type should be linked at all).

Task-number: QTBUG-35195
Change-Id: I8273d167a046eb3f3c1c584dc6e3798212a2fa31
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-09 20:53:06 +02:00
Oswald Buddenhagen
48b107ecfe make better use of $$MODULE_PLUGIN_TYPES
the module project files declare what plugins they need, as that is
necessary for automatic android deployment.
enable wider usage of this by making the information available from the
module .pri files.
caveat: the variable is called "types", but is in fact paths, so there
can be particular plugins named.

use this new facility to replace the egregious hard-coded list of
plugin-to-module mappings from create_cmake.

possible todo: automate populating DEPLOYMENT (for wince, and whatever
else).

Change-Id: Ibb9c07cfe2b0008905204cbeb81e9c8e2ae4dc69
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-24 20:20:59 +02:00
Oswald Buddenhagen
16f4bc5b63 rewrite handling of private modules
instead of being magic attributes of the main modules, the privates
are now proper modules of their own.

this cleans up some code paths, is more mappable to other build tools,
and enables private modules to depend on other private modules.

note that the library path is needed even in the "empty" private
modules, as in the framework case that's where headers are found.
consequently, the modules need to be explicitly marked with the new
"no_link" flag. this required some reorganization of qtAddModule().

Change-Id: I8e4f44a609f8d639cc01bcb658256870a627eb63
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-24 20:20:59 +02:00
Oswald Buddenhagen
6d8f7a8d34 make requirement for -private suffix explicit, take 2
the previous attempt broke ActiveQt, as it actually has public modules
without headers (they are provided by a common base module).
so explicitly mark the internal modules as such instead of applying
heuristics.

Change-Id: I8d8a2ee66f02c3444da2036a497e7f382f089f62
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-05 11:36:22 +02:00
Oswald Buddenhagen
4fd568fa06 redo include path logic for pre-generated headers
make the include dir in the source tree the "main" include path, as
that's where the majority of the headers is. then selectively add the
shadowed dirs.

Change-Id: I03ad13cfcf77175c141b94d41b1221740d851faf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:29 +02:00
Oswald Buddenhagen
f533941179 update some comments relating to forwarding module pri files
Change-Id: I3486f949fee2ac977e3cde669188790e5f4b3167
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:17 +02:00
Oswald Buddenhagen
366d276f8c allow modules to extend their MODULE_{,PRIVATE_}INCLUDES
Change-Id: I5e401edbe891846579cf6d9ff84427d16783923b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:09 +02:00
Oswald Buddenhagen
07337def65 don't add absent private include paths to non-git builds
all private headers are created by syncqt (and are thus in the source
dir), so we can simply override the normal (build dir based) paths
instead of extending them.

Change-Id: I9c1f3344c401b481b3f3d2295515f1aabffaa9a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-05 10:39:47 +02:00
Oswald Buddenhagen
53698f3e7c fix non-git non-shadow non-prefix non-qtbase builds
these builds usually assume all headers in the qtbase build (== source
== install) dir, so the path for adding our pre-generated per-module
include paths needs to be triggered explicitly.

Change-Id: I57ec441d58cdf8186907ee6c36dce08daa206c49
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 10:37:29 +02:00
Oswald Buddenhagen
0a1b89bff5 run syncqt only for builds from git
the logic in the configures was even trying to express that, only that
nowadays we always ship syncqt, so the tests were kinda pointless.

this frees us from the perl dependency for non-developer builds of
packaged modules (except for webkit, which needs almost every scripting
language on earth anyway).

obviously, this requires that the packaging scripts run syncqt in the
source dir before tarring up the sources. note that for repositories
other than qtbase, the -version argument needs to be passed to syncqt.

Task-number: QTBUG-29465
Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:47 +02:00
Oswald Buddenhagen
f4e5290709 remove pointless quoting of MODULE_*INCLUDES assignments
it would only cause trouble further down the line.

Change-Id: Ied9ba8a1ecf36b77e1091c73564bd7601ea6a6b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:35 +02:00
Oswald Buddenhagen
8739487b1c install host libraries into -hostprefix
... and introduce -hostlibdir configure option for symmetry.

the libraries built for the host have no business in the target prefix.

in principle this code would even support dynamically linked host
libraries, but that's currently unused.

Task-number: QTBUG-30591
Change-Id: I8e600fa4911a020fb0e87fbf7ef2f35647c7c4d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Ivan Romanov <drizt@land.ru>
2013-05-13 21:54:40 +02:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Oswald Buddenhagen
a5d09b9036 enumerate modules in QT_MODULES, not QT_CONFIG
QT_CONFIG is supposed to contain configure output, not a list of
modules. for example, enumerating modules is not cleanly possible if
modules are mixed with other flags.

the conflation was merely historical, due to webkit and phonon doing
it this way in the preliminary qt4 modularization.

we now have a much cleaner way to query modules (qtHaveModule(<module>),
or less recently, !isEmpty(QT.<module>.name)), which is already used
throughout Qt.

the old way was supposed to be removed for 5.0 already, but it slipped.
better do it now, before people actually start using it.

Change-Id: Iabdf0cdfaab9cd674f634f4c6ece105b2039c850
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 18:02:18 +01:00
Oswald Buddenhagen
bb793f8b50 broaden the effect of CONFIG+=force_independent somewhat
modules which demand it (i.e., qtwebkit) need forwarding pris, etc.,
even when not making a -prefix build.

Change-Id: Id405be8763e94cc074854f799bd785e9cdf62e8e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-15 18:02:09 +01:00
Oswald Buddenhagen
cb22d3bbba consolidate syncqt invocations
Change-Id: Ic28ea95201501b05c4a62366d1f70fa120161927
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-13 18:40:26 +01:00
Oswald Buddenhagen
4c34b418b8 fix lack of rpath-link when using modules from final location
if the libraries are in a non-standard location, but no rpath is used,
rpath-link is needed. this is often the case for non-prefix builds
(which have no forwarding pris any more).

as we cannot store absolute paths in the final pris, we need to store the
module names, and resolve them only at use time.

Change-Id: I1538b5d531611c76a2d7058a3b2ff683bdcbe427
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:22 +01:00
Oswald Buddenhagen
6654a05fca don't create forwarding module pris for non-prefix builds
as everything is built inside the common build/install dir, there is
no point in the fwd pri stuff.
as a "side effect", this makes it more straight-forward to relocate
non-prefix builds, which is the default on windows.

Task-number: QTBUG-28827
Change-Id: I010246a9ad87cf74974dc168768b1a8625f73260
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:44 +01:00
Oswald Buddenhagen
9e388bf692 qt_module_fwdpri.prf => qt_module_pris.prf
move the regular pri file creation into the "sub-prf" and rename it
accordingly. the original reason for the split was the deep magic in
activeqt (and phonon), which is gone now.

Change-Id: If40e941afc9293725630ed6bcf3e4ef18a692f66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:40 +01:00