Commit Graph

450 Commits

Author SHA1 Message Date
Robin Burchell
43a22ee83e android: fix stupid thinko where cflags were set before the common include
this meant that the common mkspec was unable to do 'sensible' things with the
cflags (hence -Wno-psabi not being applied to C++ code), and probably explains a
lot of other weird things.

Change-Id: I77079027dc1b2691c53212893eb90c7b935d00a2
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-03 00:03:31 +02:00
Donald Carr
82ca0936ed Remove stale qws related mkspecs
Should be be reintroduced with intent if there is sufficient interest, outside of the QWS context.

Change-Id: I598f47b5cf0c10dd66534294d0f27cf0b4e5069a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-30 04:29:44 +02:00
Donald Carr
0bfa3569e2 Migrate linux-clang mkspec out of unsupported
Change-Id: I84abc4c305c28e46dd514d3fb78d27c051dc6048
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-30 04:29:40 +02:00
Mark Brand
f4f0c8b99b Merge "Merge branch 'buildsystem' (second round)" into refs/staging/master 2012-06-29 21:26:11 +02:00
Robin Burchell
ddf7233125 Add mkspecs for android cross compilation.
Using these requires setting two environment variables, e.g, for me:

export ANDROID_NDK_ROOT=/Users/burchr/android-ndk-r7c
export ANDROID_NDK_HOST=darwin-x86
./configure -opensource -confirm-license -xplatform unsupported/linux-android-armeabi-v7a-g++ -nomake examples -nomake demos -nomake tests -v

These mkspecs are somewhat based on the work of the Necessitas crew, kudos to
them for their work in getting the NDK integration into qmake.

Change-Id: I591e423ed8dc70616009f681c81890c696110e62
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-29 21:15:46 +02:00
Oswald Buddenhagen
1491065506 Merge branch 'buildsystem' (second round)
refactoring and cleanup. fixes x-builds between different os families.

Conflicts:
	mkspecs/features/qt.prf

Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
2012-06-29 09:06:37 +02:00
Thiago Macieira
96166fa56a Update the macros for shared/DLL and static builds
Up until now, we had a mess of different macros used for building
DLLs, for building shared libraries on Unix systems and for building
static libraries. Some of the macros were contradictory and did not
work. From now on, there shall be only:

 - QT_STATIC: indicates that it's a static Qt build and the export
   macros should expand to empty
 - QT_SHARED: indicates that it's a shared / dynamic Qt build and the
   export macros should expand to Q_DECL_EXPORT or Q_DECL_IMPORT,
   depending on whether the macro corresponds to the current module
   being built (the QT_BUILD_XXXX_LIB macro comes from the module's
   .pro file)

QT_BOOTSTRAPPED implies QT_STATIC since the bootstrapped tools link
statically to some source code.

QT_STATIC is recorded in qconfig.h by configure when Qt is configured
for static builds. Nothing is recorded for a shared / dynamic build,
so QT_SHARED is implied if nothing is defined. This allows for the
existence of a static_and_shared build: with nothing recorded,
defining QT_STATIC before qglobal.h causes the export macros to be
that of the static form. Linking to the static libraries is out of the
scope of this change (something for the buildsystem and linker to
figure out).

From this commit on, the proper way of declaring the export macros for
a module called QtFoo is:

    #ifndef QT_STATIC
    #  ifdef QT_BUILD_FOO_LIB
    #    define Q_FOO_EXPORT Q_DECL_EXPORT
    #  else
    #    define Q_FOO_EXPORT Q_DECL_IMPORT
    #  endif
    #else
    #  define Q_FOO_EXPORT
    #endif

The type of the Qt build is recorded in QT_CONFIG (in qconfig.pri) so
all Qt modules build by default the same type of library. The keywords
are "static" and "shared", used in both QT_CONFIG and CONFIG. The
previous keyword of "staticlib" is deprecated and should not be used.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-April/003172.html
Change-Id: I127896607794795b681c98d08467efd8af49bcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-28 06:21:48 +02:00
Stephen Kelly
c4a05f5e3a Refactor the creation of imported targets into a macro.
This will make it easier to handle cases where the Qt installation
and the build do not match exactly. For example, on Windows, it
would be possible to do:

  ./configure -debug
  make
  make install
  make release
  make release_install

In which case, both debug and release libraries would be installed
even though it was only configured with -debug. On non-Windows, the
debug and release libraries would overwrite each other, so it is
not necessary to support it.

Similarly, we want to handle cases in the future where (on
non-Windows) both static and shared libraries would be
installed (again, not described with a single build configuration).

Change-Id: Ib7916c9664a0f72e40156a03bdfc79a4a6c24350
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-27 14:43:00 +02:00
Oswald Buddenhagen
a2382f7f15 unset QT_MODULE_* after loading the module pris
abuses have been observed in the wild, so make sure these variables are
not available.

Change-Id: I502c3f5db7d341cf6a8bd2ec09e87f129da2fca6
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
b40b91cb39 move initialization of numerous variables to spec_pre.prf
this is cleaner by design and allows removing some hacks.

Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
dafc4a884c don't put QMAKESPEC_ORIGINAL into INCLUDEPATH any more
the spec does that itself, given that the real spec is just included
nowadays, instead of copied (which never worked without side effects).

Change-Id: Ibf655b9a943dadb949d3c7a58d8fe50fcd62cef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
caa2263051 use real qmakespec as basis for finding features
doesn't make much of a difference on unix (as the default specs are just
symlinks).
on windows, it makes the gross hack used for finding spec-specific wince
default_post.prfs unnecessary.

Change-Id: Id403dce5be487e1ae22c1f54b8095a6afdd98bc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:51 +02:00
Oswald Buddenhagen
4753958db7 revamp handling of qmake target mode
the project evaluator becomes oblivious of the target mode.
the mode is set up in spec_post.prf according to the spec.
$$QMAKE_TARGET contains the feature suffixes to search, and is also
contained in $$CONFIG.
the target_mode variable itself becomes private to the Makefile class.

Change-Id: I3c06d9dab536b753343cec6c5c491d3203e50bd8
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Holger Hans Peter Freyther
8e5b6647a9 mkspecs: Use the right variable name to find the qdevice.pri
Commit 8b822825c5 introduced the
/get version but used the wrong variable name. Fix it by using
QT_HOST_DATA.

Change-Id: Ia4759b8c6ff2de9726f3aebae2f2f39c6644d4ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 20:02:55 +02:00
Oswald Buddenhagen
34cb86d46b make using testlib automatically "promote" all modules to -private
autotests often need private headers (especially with qpa headers now
being private) and have no compatibility requirements, so it makes sense
to just use the privates of requested modules.

this also suppresses the useless warning about using privates, in case
they are still explicitly specified.

Change-Id: I9e499bedcf6ef25777283ff1432cef7254e9093a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-26 11:51:34 +02:00
Stephen Kelly
c42a0a7729 Factorize the cmake test infrastructure to be reusable.
This makes it easy to add cmake module tests for all modules.

Change-Id: I303bf7674ca6ae7a8544488f96e8e02afbaa6ff0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-26 11:49:52 +02:00
Konstantin Ritt
a9ba927406 Avoid macro re-definition after 1838a6c2fb
Change-Id: I2631ff687881278ba42edacd237a2130c103b69f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2012-06-26 11:37:57 +02:00
Stephen Kelly
fa6ca58b8b Don't re-evaluate the lib location.
Rely on the DESTDIR variable being set correctly by qt_module_config.

Change-Id: I1a166124024722ec5a189a7402b38646179aa890
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 04:18:29 +02:00
Stephen Kelly
70c981f973 Fix the DEFINITIONS for Qt modules.
As the DEFINITIONS to be used for QtAddOns is different to essential
modules, rely on the logic in qt_module_config setting this variable
correctly.

Change-Id: I64485ccd6df093216cac4a97fb1cfaac0122a218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 04:18:25 +02:00
Oswald Buddenhagen
d921182310 add possibility to set $$MODULE_IMPORT_SUFFIX in module .pri files
quick1 got a suffix, so we need a way to set it

Change-Id: I099b868106abd4d3040047703472faa65f694f31
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-24 15:26:34 +02:00
Donald Carr
e6ccfe40eb Set Wayland as default platform on Raspberry-Pi
Update Raspberry-Pi mkspec to indicate that wayland is the default platform
for the Raspberry-Pi.

Change-Id: I10b30ecfb16faed6027137225d9e95409faa7e87
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-24 05:26:10 +02:00
Stephen Kelly
3d2a8d09d1 Add a variable for the private includes for modules.
This is required to use QPA for example in 5.0.

Change-Id: I44bfc6987d778370e55c05c591f63ff84c482d0a
Reviewed-by: David Faure <faure@kde.org>
2012-06-23 14:16:24 +02:00
Girish Ramakrishnan
7042de0894 eglfs: move m_pos into Cursor
Change-Id: I51e92d265e7ea6372ae58b357f75362e2d9a2df9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-22 15:42:44 +02:00
Girish Ramakrishnan
57ca02b1d2 embedded doesn't exist anymore
Change-Id: Ib56895defb72f51bb790994b9fd72fc81ef25af5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-22 07:41:31 +02:00
Bradley T. Hughes
1618ef236b mkspecs: Add macx-clang-libc++ and macx-clang-libc++-32
Use these mkspecs to switch to the new libc++ C++ runtime library, which
in turn makes it possible to enable C++11 support with clang.

Change-Id: If92908592f8bee4829a1bad747fe396f527d26c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 15:45:07 +02:00
Oswald Buddenhagen
2f1762535b make missing qt modules fatal
there is no point in continuing; it will error out later (in more
cryptic ways) anyway.

Change-Id: I2562eadc2d91bfaa6e85368dc3774da31409a141
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
0fdf7c3a43 less confusing wording
Change-Id: Ia509fe1a28de803673623d425f5949b35404598c
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
1ee462604b fix misnomer: qt_module.prf => qt_build_config.prf
qt_module suggests to be congruent to qt_plugin.

Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
b3a497d781 fix regexp in qmodule.pri inclusion check
this also allows us removing the redundant flag variable

Change-Id: If26d22280ce7bc2ef3514c7c11ce7cd9baec1293
2012-06-19 16:46:08 +02:00
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