Commit Graph

421 Commits

Author SHA1 Message Date
Oswald Buddenhagen
575a516630 revamp automatic makefile generation for sub-projects
instead of making the "real" targets depend on the makefiles, add
conditional makefile generation to the targets themselves.
this causes makefile generation to follow the recursion order determined
by the project, which is important when dealing with prl and module pri
files.
a side effect of this is that qmake and make calls are interleaved now,
which is entirely different from a 'qmake -r' run.

on the downside, calling make with multiple targets which operate on the
same subprojects without prior makefile generation will make a mess, as
the qmake calls will be racing. this should be no problem, as qmake does
not generate recursive targets where this would be useful - at least by
default.

it is not sufficient to just order the creation of the makefiles
non-recursively (e.g., by using gnu-specific order-only-prerequisites),
as an interrupted and subsequently resumed build would happily skip the
nested makefiles.
workable alternative approaches would be walking the entire tree in a
pre-pass to ensure makefile presence (which is incredibly slow) or
creating additional stamp files only after recursing and having the
makefiles depend on them (which is ugly).

Task-number: QTBUG-23376
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Change-Id: I88d3e7610215677d362026de316513d3bea04b06
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
e6d97f3f77 support for private depends in modules
if a module's private headers add additional dependencies, QT_PRIVATE is
now the place to declare them. note however, that this may not contain
other private headers in turn - that would be much harder to implement,
and we want the explicitness anyway.

Change-Id: Ic516fcf1a003c95798df4fbe216f92016afaf47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
5290f6df89 introduce $$QMAKE_CHK_EXISTS_GLUE
instead of hard-coding platform differences, use a variable.

Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
45a201b6a3 centralize definitions of shell commands
there are only two types. everything else is duplication.

Change-Id: I87f2bdd3d56b94bb2ecdb60e8861afeb9af3666f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
3c144b54cf normalize $$QMAKE_QMAKE
everything in the projects should be normalized. only the makefile
generators need to adjust it to the native form.

Change-Id: I06a4e997f32134d13949ec4a9dd1b44367aab7cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
2cfde5d9c3 correctly find idc even for makefiles
this is a qt tool, so it needs appropriate treatment

Change-Id: I0cb30ba07e03c72ee275cd916ca0a39a99fc3705
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
98470fd9be scan module path backwards
the last read file wins, so reading in inverse order ensures that we
respect the list's sorting by decreasing priority.

Change-Id: I2e6539a52d4195ed6af4c0143b035c39577b8310
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
a56ef02b2d let default_pre add modules to the qmake path
that way qmake is made aware of the forwarding pris which are generated
for this module even when a top-level .qmake.cache prevents the module's
root from being found automatically.
the path is also added to the cache, so that subsequent partial
qmake-ing of the tree will still find the module.

this also makes the -cache-module-fwd parameter of syncqt useless, so
remove it.

Change-Id: I2afbc52a465c0b3260e9bcaf032c43a82ae8061f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
a943f40483 recognize QMAKEMODULES env var, property and cache variable
the latter allows sub-projects to dynamically extend the qmake search path
specifically for modules. the others are just for congruency with
QMAKEPATH and QMAKEFEATURES.

Change-Id: I0c099035f8dc8ee8645566dbc635644a15ed9da5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
32042413f2 move generation of module master headers to qt_module_headers
this has the advantage that the %mastercontent assignments in sync.profile
are not necessary any more. as it happens, most modules got them wrong
anyway.

Change-Id: Ibdf689be408f18e1d90c44ef4ecacd7c24b1f1c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
eae5135808 remove detection-based usage of modules which are frameworks
each qt module comes properly declared and located, so there is simply
no point in performing a search.

Change-Id: I86fad21bb8e128b85f1000cc116cc44a23642eb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
a0374fd490 fix direct includes from modules which are frameworks
Change-Id: I1f2c1e5ebdb2fa258500a08b32dcafb4150ee424
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
5cea63d2f2 let modules which are frameworks remember that fact
this will allow us to not rely on the modules matching the global
qt_framework setting.

Change-Id: Ic1dce757ff63d06af54a2428e23a1bbcf1c81ba1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
88a07df5e5 remove workarounds for broken syncqt
SYNCQT.HEADER_FILES contains qconfig.h just fine nowadays.

Change-Id: I52b35d2ac41d772acaef06f3931df75742c867cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
c595988a58 automatically add QT_BUILD_FOO_LIB to DEFINES
Change-Id: I35d9861e48469eb5cc8824e361450684047e6559
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
0f548b1744 remove backwards compatibility hacks
there won't be terribly many projects relying on it. now's the time to
find out for sure ...

this reverts commit 3279b07302fde0eb14f9b197c9ad2e14d512817e

Change-Id: Id36687ab3bfc7dd5ce35b584621a8f5b3ee00fc9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
131ba187f2 auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTION
less boilerplate, more accuracy

Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
f3cca88ac4 move QMAKE_PKGCONFIG_VARIABLES stuff out of qt_module_config.prf
this only needs to be set in one module each - the one which provides
the relevant tool.

this is moderately source-incompatible, in that a package which queries
a given variable from the wrong library won't get the path it looks for
any more. as it's likely that everyone was using QtCore as a reference
anyway, this will only affect uic - which is in the new QtWidgets
library, to which people need to adjust anyway.

Change-Id: If05d3c33fda6cd12466e261391b825c59651d3e4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
19009cde45 remove ACTIVEQT_IDC assignment from QMAKE_IDC
the specs have been cleaned of it

Change-Id: Ica0ab4d5f9d36f1f9566759326f3b3144e34cd67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
65c1ed6281 remove support for CONFIG+=qt_compat
this is truly prehistoric stuff

Change-Id: Ia781fc03c081bff895f4d2b5325d3624441bdf5f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
8b75fc7bac don't explicitly inject qt header/library paths
the modules already do that on demand.

Change-Id: I889a5cd7b62631e2551ada4b096f20b3b79b2c75
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
4816ca6c56 always add library path from module
that way we can theoretically support modules outside $QTDIR.
also, it's just cleaner.

Change-Id: I6139ebc7328b64ace8552b3e54f9a8c69248ceec
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
5d1b4c79d2 make module includepath addition less convoluted
don't prepend the paths, as this will only mess up building of
subsequent modules (e.g., building qtdeclarative against an installed
qtbase would pick up the headers from the qtdeclarative previously
installed into the same directory as qtbase).
for frameworks this was a rather pointless exercise in the first place,
as their headers are properly isolated anyway.

however, make sure that we don't add system locations to the search
paths, as this is a) unnecessary and b) messes up subsequent libraries
in non-standard locations which want to shadow versions in standard
locations (pkg-config .pc files which add standard paths are considered
broken as well).

Change-Id: Ie1dc65d4767e98e1df6e49012505141935a6c704
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
46ae5598e5 add qtCompileTest()
this fully replaces qtmodule-configtests.
it is way shorter and it actually integrates reasonably with qmake.

Change-Id: I819cc6807ad3661c419b54fa253894936dd88a64
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:57 +02:00
Oswald Buddenhagen
2d8dd9a6c9 do not route qtmodule-configtests invocation through syncqt
there is completely no reason to do it.

Change-Id: Ie186ef4c1bbd12c256acb2fe374d12ebe777d6c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:57 +02:00
Oswald Buddenhagen
0b76b7ab8a auto-generate module pris
Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:06 +02:00
Oswald Buddenhagen
95b2e051f9 move creation of module version header to qt_module_headers
Change-Id: I650b495ec1789eb03b31d796f9f475ba01aab2d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:05 +02:00
Oswald Buddenhagen
e203e42906 automatically add the version header to HEADERS
Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:04 +02:00
Oswald Buddenhagen
92c76ffcf1 factor out qt_module_headers.prf
this doesn't make too much sense as such, but the file will grow.

Change-Id: Iceaecdc24f83b3dafb40c8d2f1b6cddafa2d70a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:04 +02:00
Oswald Buddenhagen
b2dc56d5cf make headers.pri locality determination less convoluted
the location is determined by syncqt rather precisely. no need to
reverse-engineer config files.
$$HEADERS_PRI doesn't seem used anywhere, so don't set it as a side
effect.

Change-Id: I54a63356c350c0ddae4c880bf374fcd127282429
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:03 +02:00
Oswald Buddenhagen
a8ad1e77ba generate fwd-pris in qt_module_config, not in syncqt
the forwarding pri is loaded even if it was still created by syncqt, so a
top-level qmake -r will still catch it even in the future.

Change-Id: I2e4b556cd06eb88be9ee378662a2e6e1bff67ad7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:03 +02:00
Oswald Buddenhagen
d31f4a560d bring statements into a somewhat logical order
Change-Id: I7bfbcd414bd2c8ff82e210c075b88f1ca00d3b73
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:03 +02:00
Oswald Buddenhagen
a18bd8203d remove qt from CONFIG for non-artifact templates
there is no point in adding Qt modules to SUBDIRS projects.
as QT contains core and gui by default, the operations are relatively
expensive, so skip them when they are unneeded.

Change-Id: Ibe6447ff452e403cb040fabe245d248edbda0eaa
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:03 +02:00
Oswald Buddenhagen
ffa2e1d007 define have_target CONFIG flag
the check whether we are building a lib or an app (and thus have a target)
is done by quite some feature files (and generally wrongly, as they do not
account for the new aux target), so centralize it in default_post.prf.

Change-Id: I868edbc4185be8a6c23ecd4a2c126024d73cdeb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:02 +02:00
Oswald Buddenhagen
e7b9600103 add possibility to install a module with no library
the declarative module is a fake, so there is no library to install.

Change-Id: I0dcd39f3304e38adce9ea34e2268905525abd3d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:02 +02:00
Oswald Buddenhagen
c23767bab9 make version fallback code sane
the qt version is always set.
otoh, we need to allow the module to override the own version.

Change-Id: Ic3eb7dae59a5fb011cede09151553b652a0a1d78
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:02 +02:00
Oswald Buddenhagen
0202e15617 remove explicit RCC_DIR addition to INCLUDEPATH
qrc_ files are generally not meant to be included, so there is not much
point in doing this.
qprintsupport was a notable exception - which broke on mac and thus
needed a hack. just remove the qrc_ inclusion.

Change-Id: If5115665f331a280869e800673bf7b81d3ab559a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:01 +02:00
Oswald Buddenhagen
10075973e2 make qmake module path configurable separately
this is needed by webkit's creative directory layout.

Change-Id: I2317162c11696d2820423d63563b10d3024a6cb6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:01 +02:00
Oswald Buddenhagen
45711a8b73 write forwarding pris to $outpath/mkspecs/modules
this makes qmake find them automatically now.
consequently, also do not write QMAKE_EXTRA_MODULE_FORWARDS to
.qmake.cache. still write the cache file, though, as otherwise a
top-level cache would mess up the module root detection.

Change-Id: I998b94fcc73ca3f8bf1af09a394ff8d40cf1fb76
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:01 +02:00
Oswald Buddenhagen
4aef57e02c remove useless variable assignment
Change-Id: I3552305473cd0150d83c1e2a3c9fb0c4097244cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:00 +02:00
Oswald Buddenhagen
926cf05f80 rename QMAKE_SYNCQT_OUTDIR => MODULE_BASE_OUTDIR
a variable name should not reflect the tool which uses it, but its
purpose - especially, as the scope will be extended soon.

this variable is used by webkit, which has a somewhat creative directory
layout.

Change-Id: Id3d3fad6ed9395cb967aeabc79e47a0ba17f5423
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:00 +02:00
Oswald Buddenhagen
f4b7e33c0b make qt_module_config.prf install the module pri file
absorb module.prf into qt_installs.prf, as that's where it belongs.
add qt_install_module option and automatically set it in
qt_module_config. make qt_installs use that option.

Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:00 +02:00
Oswald Buddenhagen
84fb7be6c1 make qtAddLibrary() a noisy compat wrapper for qtAddModule()
it's used by people (in particular, qt creator), so it would be not nice
to just delete it entirely.

Change-Id: I6bd849d00ebfe3b9b126e01a6d1c6e7c6584d8ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
c4eed770be purge QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT
they are equivalent to QT_INSTALL_(HEADERS|LIBS)/get.

Change-Id: Ic4b47f3ca7db55785b96f19020a2fa020a8d25bd
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
9206932105 simplify code which determines how/where to create forwarding pris
the qtbase install dir being a build dir is a necessary and sufficient
condition for detecting a developer build.

Change-Id: I3d98c789ac6fbe570980459edabb9a941bf1e5d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
ab9f0e694f move $QTDIR handling out of syncqt
instead, always pass -qtdir (which, btw, is a slight misnomer - it
should be -qtdatadir) with the correct path. this centralizes the
relevant logic in default_pre.prf.

Change-Id: Icc788d3f3e5f7b68b444e63e181efdea3b4ef160
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
8b822825c5 make use of $$[FOO/get] properties
this cleans up a lot of hacks supporting the build of qt, including the
last bits of $QTDIR.

Change-Id: Id119886ed8097967dad6cf86ebd4e71d90c42841
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:58 +02:00
Oswald Buddenhagen
107aeb870b move moc, rcc and uic CONFIG additions to the respective qt modules
they don't belong into the global scope

Change-Id: I27a3de5f706392b3c4a84035521bc3b4e4055740
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:53 +02:00
Oswald Buddenhagen
4204a8555c remove some DEPENDPATH nonsense
qt is built with depend_includepath anyway

Change-Id: I3967ad0bb52f5a3d88fceaf102c79f6711aaa83a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:52 +02:00
Oswald Buddenhagen
812adb58ba dispose of library-bound feature files
specifically, qtestlib.prf, qdbus.prf, help.prf, designer.prf and
quitools.prf - they have been obsoleted by modularization.
add noisy backwards compat hack to qt.prf.

Change-Id: I26f84fdd51798265471e20dd1f40efec59b1087e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:52 +02:00
Oswald Buddenhagen
528192a78b Revert "make default_pro.prf advertize dynamically created .qmake.cache"
... and followup fixes.
this is not needed any more due to the breaking patch being reverted.

Change-Id: Ia3416fcc16ddece680efbd0322286a601879fa0a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Johannes Zellner
60f2abff5e raspberry: remove unused screen size detection code
The fbdev fallback code now resides in the default implemenatation of
the hooks.

Change-Id: Id3d2cd23ab826b90c0e6d442bfb222aa8c291646
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-19 00:38:27 +02:00
Johannes Zellner
11aa64b1a1 eglfs: Pass QSurfaceFormat to createNativeWindow() hook
Change-Id: Ib352d8591360a224359ef218b95cd27cdfaf81aa
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-14 16:12:31 +02:00
Sean Harmer
0346d605e3 Do not add debug/release to QMAKE_CONFIG. Let module system enable them
This solved QTBUG-26111 in which qtjsbackend gets built with an
incomplete framework on Mac OSX. This was traced back to commit
6a6fd56e66 which moved QMAKE_CONFIG
values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend
contains config tests it creates its own .qmake.cache which was
previously masking this issue.

QMAKE_CONFIG incorrectly contained debug for debug_and_release builds
even though debug and release are already present in the CONFIG variable
in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in
qmodule.pri from containing debug and release variables and ensure
that QT_CONFIG contains build_all and debug_and_release if appropriate.
Configure.app is also adjusted to match this behaviour.

The other part of the change is to qt_module_config.prf and
qt_plugin.prf. These changes take care of populating CONFIG with
the appropriate debug_and_release and build_all variables depending
upon what is present in QT_CONFIG. This ensures that the Qt modules
and plugins get built with the same configuration as qtbase.

The special handling for the qcocoa QPA plugin ensures that it is
built in release mode only to preserve the behaviour introduced by
commit 5603f94eaa.

Task-number: QTBUG-26111
Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-14 03:03:38 +02:00
Sean Harmer
5eae12ff72 QNX: Enable additional CPU features to be compiled in for QNX
The QNX toolchain can use Neon on ARM and SSE<X> on x86/x86_64.

Change-Id: I36c61fa12b65d806b3cc60a0aefcb63964f9ab7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-14 03:03:38 +02:00
Girish Ramakrishnan
4b7a4c40d8 eglfs: mark overriden methods with Q_DECL_OVERRIDE
The current cursor implementation can be a bit hard to read
without hints about which methods are overriden.

Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-13 23:59:17 +02:00
Andy Shaw
ef459193ec Fix compile issue on AIX
Since local thread storage is used we need to turn this on for the xlc
compiler with the -qtls flag.

Change-Id: Ib40ec87edada56a062b0c72b7d47b38a6d0b5b13
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 22:57:22 +02:00
Mark Brand
76b2d130ae add SSE2/AVX/Neon/etc. flags to mkspec win32-g++-cross
Follow-up to 6a51062e99 which did this
for win32-g++.

Change-Id: I3ba0dd8ffca46853844b55b16dc92270fa8a623a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-12 20:06:39 +02:00
Johannes Zellner
1c86619037 raspberry pi: Dont use the video layer for EGLFS
The OpenmaxIL video_render component uses the dispmanx layer 0, so EGLFS
should use at least z index 1. Otherwise the video_render would conflict
with the UI and thus overpaints it.

Change-Id: I3bed23567fa8c4399207289c6ef952c5a5e0d503
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
2012-06-12 04:30:12 +02:00
Girish Ramakrishnan
4fd095d242 raspberry pi: add /opt/vc/include/interface/vcos/pthreads to includes
See https://github.com/raspberrypi/firmware/pull/32 for more information.

Change-Id: I51bb532336ed069cde938540cd962721b1a72adb
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-12 04:30:09 +02:00
Thiago Macieira
6a51062e99 Move the SSE2/AVX/Neon/etc. flags into the compiler mkspecs
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.

Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:42 +02:00
Stephen Kelly
77a03ebd8d Expand the 'existing target guard' in generated CMake files.
This way the target will be created and have its properties
populated only one time.

I tried wrapping the whole file in an 'include guard', but that
broke the unit test in tests/auto/cmake/pass1 (and
the qt5_use_module function), because the function causes the
variables in the Config file to not exist outside of the
scope (eg for include directories), and yet, Qt5${Module}_FOUND is
still true even when the find_package was previously called in a
function, so it is not found and processed again.

The change in Qt5CoreConfigExtras.cmake does not need to be guarded
as it is only ever included from Qt5CoreConfig.

Change-Id: Iaa016563db5eb61294360ac9e003c9c923393d8c
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-07 19:08:34 +02:00
Donald Carr
b194575b85 Fix common device spec paths
This fixes breakage in the Raspberry Pi spec introduced in:

https://codereview.qt-project.org/#change,27536

due to incorrect depth assumptions regarding included files.

Change-Id: I802b828f1755f299939fed192dd3ca9bf1a83002
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-07 04:16:49 +02:00
Donald Carr
058c8da0f1 Generalize common device properties out of Raspberry Pi spec
Change-Id: I58cc9c9219bf3e9ed8e7401cb66f968306d7bfc9
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-06 02:02:40 +02:00
Bradley T. Hughes
bf84d1a1fe configure: Auto-detect and enable C++11 support if available
Enabling support for C++11 adds CONFIG+=c++11 to the Qt build. Projects
using Qt can check for C++11 support using contains(QT_CONFIG, c++11) in
their .pr[iof] files.

The QMAKE_CXXFLAGS_CXX11 and QMAKE_LFLAGS_CXX11 qmake varibles contain
any arguments the compiler needs to enable C++11. CONFIG+=c++11 adds
these arguments to the build.

Support for clang, g++, and the Intel C++ Compiler for Linux are
included in this commit.

Change-Id: Id77f86d7ad4d5c740b890446a40b105879a0d327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-05 12:30:13 +02:00
Girish Ramakrishnan
5933205cfc eglfs: implement hardware cursor for the raspberry-pi
The cursor is rendered on a dispmanx layer and moved
around. This approach saves us from having to update the
underlying window each time the cursor moves.

Dispmanx layers cannot be moved to negative coords. As
a result, currently it is not possible to move to a
location less than the hostpot. A future commit will
fix this problem.

Change-Id: Ida5ee961d03a6929860c515e503482756a4913ed
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-01 15:22:49 +02:00
Donald Carr
698e5b376d Remove all references to X11 session management
There is no session management currently implemented for the xcb QPA
backend. Update the build system to reflect this.

Change-Id: I3486de5741f1fb7e09330ca142b8235a84d3b91d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-01 03:15:55 +02:00
Thiago Macieira
6a6fd56e66 Move the sub-architecture feature to better places in qmake
Instead of saving the ability of the compiler to produce SSE2, AVX,
Neon, etc. code in .qmake.cache (Unix) or qconfig.pri (Windows), move
everything to qmodule.pri. Accordingly, move the DEFINES += settings
to qt_module.prf instead of qt.prf.

This allows us to re-use these settings in other Qt modules (other
than qtbase), if necessary. Though currently the extra compiler
definitions are found only in src/gui/gui.pro. They can be moved
elsewhere when it becomes necessary.

As a side-effect of this change, some other flags are moved from
.qmake.cache to qmodule.pri (on Unix). The flags that are getting
moved should probably be moved anyway.

Change-Id: Ibc3ab0111e148d81870772f9357273660aa93417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-31 17:55:49 +02:00
Thiago Macieira
398c8513b1 Overhaul the qsimd_p.h: rename macros and update conditionals
The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx.
They indicate that the compiler supports those intrinsics, but not
necessarily that they can be used right now.

ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.

Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-31 17:55:37 +02:00
Friedemann Kleint
e7f1106edb Windows: Add ANGLE support.
- Add QWindowsEGLContext usable for ANGLE and Windows CE.
- Add QWindowsEGLStaticContext containing the display
  for resource cleanup.
- Add EGLSurface to QWindowsWindow.
- Add a -angle option specifying the path to the external
  ANGLE installation to configure, add libraries to
  the mkspecs.

Initial-patch-by: Jabot Corentin <corentinjabot@gmail.com>

Task-number: QTBUG-24207

Change-Id: I5f80b1efb6996da7c5d70aa3720f7801c9e4c6af
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-31 09:13:01 +02:00
Donald Carr
dce42ebd23 Add hard float-abi support to Raspberry Pi spec
Change-Id: I1bed28bdb5f84e61605972713a20359cc6deeaa6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-05-30 23:55:35 +02:00
Donald Carr
15fcb229cb Introduce a Snowball mkspec to the device specs
Change-Id: I7aa2f1a719c424079d7f0d7b3410f293cee05fa9
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 00:19:37 +02:00
Girish Ramakrishnan
2d990ccba6 -device: remove redundant check for empty CROSS_COMPILE
Remove the check from ST7540 and PNX8473 specs since
it's already checked in deviceSanityCheckCompiler

Change-Id: I2accb12f9e692e253f76194ca68b1f4cc673a833
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-24 14:49:56 +02:00
Holger Hans Peter Freyther
92a61d896e bcm97425: Fix linking the directfbegl QPA plugin
directfbegl requires libQtPlatformSupport to provide some EGL
helper functions. Enable EGL by adding it to the QT_CONFIG variable
in the qmake.conf.

Change-Id: I80d3163d9da4b9eb232aea72ba7d4388453f8247
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-24 07:14:58 +02:00
Jonathan Liu
10cfb08eae Enable extra warnings for win32-g++ mkspecs
Change-Id: I09d6ed18007f29bad84e757f2916c6f7323e5b44
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-05-23 20:09:09 +02:00
Holger Hans Peter Freyther
a6bd4c60e4 devices: Allow to pick up the compiler from the path
Re-enable checking if the compiler is in the path. The previous
commit dealt with a user/spec author not setting CROSS_COMPILE and
then picking up the host g++. Re-add the 'which' check, but put it
after the sanity check for the CROSS_COMPILE variable. This check
assumes that QMAKE_CXX is of the form "${CROSS_COMPILE}g++".

Change-Id: I54f7e058a75d26d73eca5a860946a6854ce91d67
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-23 19:27:41 +02:00
Girish Ramakrishnan
b41028aaf3 device: Check CROSS_COMPILE in deviceSanityCheckCompiler
QMAKE_CXX is initialized by default to gcc. As a result,
'which $QMAKE_CXX' always succeeds.

This change removes the 'which' check and makes it explicit
that CROSS_COMPILE is a mandatory option to -device mkspecs.

Change-Id: Icefa9d14fc24086a60c9108ff7d9d16fd9990995
Done-with: Johannes Zellner
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-23 00:41:35 +02:00
Girish Ramakrishnan
ac16d72214 eglfs/pi: update handles are 'local' variables
Change-Id: Iec687e9cd015ed389a637b50e4e4e332478b6e1f
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-05-22 05:09:11 +02:00
Donald Carr
707fc2bb00 Clean up Raspberry Pi spec
Introduce platform libs hook to handle/allow device specific initialization and the associated symbol resolution

Change-Id: I098b07dcb581390d369d9165c6cedc7ace1e088a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-22 05:09:04 +02:00
Friedemann Kleint
d340769125 win32/default_pre.prf: Remove exceptions_off, thread_off, stl_off.
- thread_off, stl_off are obsolete.
- exceptions_off causes exceptions to be globally disabled for
  applications using MinGW after
  2b21dd69d6.

Change-Id: Ia109c5806f2a0172efed5680a55ca53a2846d778
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-05-21 16:02:06 +02:00
Romain Pokrzywka
a3d4e0cbb1 Remove optimization flag from QMAKE_CFLAGS
-O2 is already the default optimization level for release builds,
as defined in gcc-base.conf. In addition, it shouldn't be set for
debug builds.

Change-Id: Idd7406b0d135d9579676b389050fd6e5776e722c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-17 23:56:35 +02:00
Romain Pokrzywka
c70008d13e Apply compiler platform flags to debug builds as well
Compiler flags like CPU architecture and FPU should be set on
QMAKE_CFLAGS instead of QMAKE_CFLAGS_RELEASE, as the latter only
applies to release builds

Change-Id: I2e729a9e413934e904fc2810394e118940b8557f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-17 23:56:16 +02:00
Lars Knoll
2b21dd69d6 turn off exceptions by default where they aren't required
This significantly reduces the size of the generated code
in places where we don't need exceptions.

The -(no-)exceptions configure flag has been removed in the
process, as there is now a fine grained way to control this
on a per module level, and Qt is being compiled without
exceptions in most places.

Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-17 05:14:26 +02:00
Andreas Holzammer
1a4f58d3e6 Add Visual Studio 11 mkspec
This adds the Visual Studio 11 mkspec
and the corresponding changes to configure
and qmake makesystem.

Change-Id: I3a7e82a6f7f90aa0a94dedd493ebaa66bf100923
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-16 13:34:20 +02:00
Stephen Kelly
a49a92bd9d Properly quote all variables which are paths.
This is required if Qt is installed into a directory with spaces.

Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-16 12:03:54 +02:00
Stephen Kelly
f16a77d783 Use IF(NOT TARGET ...) before creating imported targets.
Initially we didn't do this because someone could accidentally create
another target of a conflicting name, and used a variable to store whether we
have created the target already or not.

That wasn't adequeate to deal with finding the package in a scope
like a function, so we used a directory property. However, the directory
property is not valid in the same scopes as the defined target. For
example, finding a Qt module in both a directory and a subdirectory causes
a conflict.

As it is already unlikely that a target would be accidentally created with
a name like Qt5::Core, we should simply use the IF(TARGET) form.

Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27
Reviewed-by: David Faure <faure@kde.org>
2012-05-15 23:03:23 +02:00
Marius Storm-Olsen
58ab3a79a0 Set QMAKE_DOCS_INSTALLDIR to $$[QT_INSTALL_DOCS] to allow overriding in .pro
Normally you want to pass -installdir $$[QT_INSTALL_DOCS] to qdoc by
default. However, if you want to force the generation of URL links to
the documentation, the option cannot be specified.

By setting the QMAKE_DOCS_INSTALLDIR variable in default_pre.prf a
project may override it at will, as for example Qt Creator would do.

Change-Id: Ib31f03acf4e8050cf2dd3aa33f3a10ed027f1df7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-15 14:34:15 +02:00
Donald Carr
1da0db344a device: don't set a default cross compile prefix
qmake -set can be used instead to set a the default cross compile.
device_config.prf already contains code to read this default.

Remove per-spec CROSS_COMPILE checks

Introduce deviceSanityCheckCompiler() usage where appropriate

Done-with: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Change-Id: I07c75c9e933dc1174a1bf8bf523b6b4a6b427408
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-15 04:56:59 +02:00
Stephen Kelly
2b735ac8e6 Use directory property instead of variable to determine target existance.
This is more resilient to calling find_package in a scope such
as a function.

Change-Id: I17e69a416f4aed3102fa6195d239bcf4ce0b306b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-14 04:35:08 +02:00
Stephen Kelly
dd38ad600f Only find dependencies from the same Qt installation.
Add a PATH to search for dependencies in the current prefix, and
disable other CMake searching logic with NO_DEFAULT_PATH.

A Qt installation must all be installed to the same prefix currently.
If that constraint is ever relaxed, we can turn this into a hint instead.

Change-Id: I633cafb7e546dbd102ac0b2ed18db260d26adc51
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-13 18:49:10 +02:00
Donald Carr
f1ea4ed3d4 Remove stale udev check
udev headers now ship as part of the base debian reference image

Change-Id: I181c7f48ca59af46fccf8f3204845379d068c023
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-12 01:24:55 +02:00
Bradley T. Hughes
7a67c822e3 configure: Remove the -dwarf2 argument for Mac OS X builds
Modern versions of Xcode properly support dwarf2, and as such dwarf2 is
always enabled. This change removes the ability to turn it off, making
dwarf2 non-optional.

Change-Id: I149daeae6048ee8a1ed116363572173ad219102e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-11 12:52:21 +02:00
Friedemann Kleint
3195b41eb7 Remove declarative from qmltestcase.prf.
Change-Id: Ia4bf45132a74ec7bbbb2a918088c176f87a26e76
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-11 12:52:21 +02:00
Stephen Kelly
4e8c20e97e Add underscore to internal implementation detail variables.
Change-Id: I4c70ed2808396931fff986fbfad5940dd39e74f6
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-10 22:46:55 +02:00
Stephen Kelly
bced700e88 Include the VERSION_STRING in CMake config files.
Change-Id: I9f0e9316241b4cb615350876b11ee263f7efd3bf
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-10 22:45:54 +02:00
Marius Storm-Olsen
9456528aac Merge branch 'docs-refactoring' into master
Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
2012-05-10 09:11:23 +02:00
Marius Storm-Olsen
9fde9ab167 Properly implement a 'make docs' target for subdirs and apps/libs
Only call qdoc for projects which sets the QMAKE_DOCS variable to
point to a qdocconf file.

Exclude examples/ and tests/ from the qdoc run, by adding
    no_docs_target
to CONFIG for those projects.

Change-Id: Ic856c8f19db59309302d0602b3e99735609e525a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-05-09 08:34:42 +02:00
Girish Ramakrishnan
4a58853aea Fix qpa files installation
qpa header files were not installed under qpa/.

Change-Id: I243c3a7e83a342f7485791a1a29b65c9a8f25d6b
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-08 20:03:49 +02:00
Stephen Kelly
27ca259fb6 Don't attempt to ask cmake to find the glib dependencies.
Those components are not known to FindGTK2.cmake.

Change-Id: I4a7fe35d7d118168c24285f3ea8f57822b2facff
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-08 06:59:19 +02:00
Donald Carr
bcc9c50b50 Introduce Arch Linux specific link line to pi mkspec
Change-Id: I77c99a2f5e25c28ad2d4a13e3b56d3603cd5bb64
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-05 00:52:14 +02:00