Commit Graph

1045 Commits

Author SHA1 Message Date
Stephen Kelly
703cca8bb7 Adjust the cmake files to find the dlls in the bin dir.
Change-Id: I840f963c3648d123b31f79aa2c8902c0ad74e982
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-06-15 19:04:53 +02:00
Frederik Gladhorn
9b102e953f Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-06-13 10:05:49 +02:00
Frederik Gladhorn
e2776b44a0 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoamenubar.mm

Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
2013-06-12 19:17:07 +02:00
Oswald Buddenhagen
23d8a7fb23 don't copy/symlink doc/global to build dir
instead, use the files directly from the source dir.

Change-Id: I03b728c66de6e03cade6dc153dcc78cea8e3f606
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 16:27:28 +02:00
Frederik Gladhorn
be4b80af82 Merge remote-tracking branch 'origin/release' into stable
Change-Id: If29ca1b27da4592d40a7678837c359f75dac1209
2013-06-12 14:43:55 +02:00
Tor Arne Vestbø
5c8aa27111 iOS: Remove need for separate qtiosmain library
We can combine the hybrid and non-hybrid use-cases into a single static
library if we are careful about which symbols are included in which
object files. By limiting the main() and qt_user_main() functions to
their own translation units, the linker will only pick them up if they
are missing at link time (the user's program do not provide them).

This technique is resilient to the -ObjC linker flag, which includes all
object files that implement an ObjectiveC class or category, but will
fail if the -all_load flag is passed to the linker, as we'll then have
duplicate symbols for either main() or qt_user_main(). The latter should
not happen unless the user provides the flag manually, and in the case
he or she does, there's ways to work around it by providing less global
flags such as -ObjC or -force_load.

Change-Id: Ie2f8e10a7265d007bf45cb1dd83f19cff0693551
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-12 12:35:02 +02:00
Tor Arne Vestbø
e99fc91c58 iOS: Remove need for -force_load of platform plugin
Instead of force-loading the whole static library of the platform plugin
we tell the linker to look for the missing symbol qt_registerPlatformPlugin.
This symbol is provided by the same object file as the plugin's static
initializer, so the object file is included in the final binary and
the static initializer is run, resulting in the plugin registering with
Qt.

We could have marked the actual static initializer wrapper provided by
Q_IMPORT_PLUGIN(QIOSIntegrationPlugin) as undefined, but due to the C++
mangling this would look less intuitive on the linker command line than
the custom dummy function that we provide, which has C linkage.

Change-Id: I6805537e1f49260a41d48c555376964cb1fe75d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-06-12 12:34:44 +02:00
Oswald Buddenhagen
6bf5ef044f remove overquoting of extra compiler arguments
qmake automatically escapes the ${expandos}.

Change-Id: If74b6d2f2c68ff50785fdcbb66351122a273051f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 10:10:50 +02:00
Oswald Buddenhagen
7f6c864157 remove overquoting of extra compiler commands
the commands are already quoted appropriately for the shell.

Change-Id: I746bb5fba2cd6548c5dc7ef81087c69a200ecbb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 10:10:47 +02:00
Oswald Buddenhagen
aa3f1cc8c6 fix QMAKE_COMPILER fallback for clang specs
in the actual specs, we also set 'gcc' for clang.

Change-Id: Ifc6b27d56596f34c944205795d665f545d090f80
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2013-06-12 10:10:44 +02:00
Stephen Kelly
1937012b3e Don't test existence of private header directories for mac frameworks
These directories are not currently part of the Qt installation for mac
frameworks.

Task-number: QTBUG-31641

Change-Id: Ifef372cc2ebb692f9ae5a7b1f8dba5f683d1e7eb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-06-10 23:29:49 +02:00
Stephen Kelly
e1109df7a9 Remove the use of CMAKE_FIND_ROOT_PATH.
This is actually a list in CMake, not a value to be prepended
to paths. Specify the QT_SYSROOT instead to root the location
of include directories. CMake will soon get a CMAKE_SYSROOT
variable which will replace this.

Change-Id: I239f69f127f3676a3835aa4f29638f44ef209819
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 23:29:40 +02:00
Fawzi Mohamed
d7b79ff3ef mkspecs/qml_plugin: adding -nonrelocatable flag to qmldump call
nonrelocatable adds the full uri to the exported type information
which is the correct thing to do for the qt plugins (and 99% of
the cases).
This way import bla.x 1.0 works correctly in the code model.

Change-Id: Ia06873dd8b2ea4627e3297a98e8df87275ceaf73
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 23:29:36 +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
f3331e14e6 reshuffle path setup
rename MODULE_PROFILE_DIR to MODULE_BASE_INDIR.
force MODULE_BASE_OUTDIR to be always the shadow of the above.
rename MODULE_BASE_DIR to MODULE_SYNCQT_DIR (the former is still
recognized for backwards compat with webkit).

the idea behind these changes is making the variable names and override
possibilities reflect their actual use.

Change-Id: Ica4062d7231a0ce13241670e0d0f43e6b1b97160
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:24 +02:00
Oswald Buddenhagen
81b942f0d1 use correct variable for library base path
Change-Id: I6d621db2c4d5365a9c9a7284026b464e663a4cc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:20 +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
Frederik Gladhorn
75067b56fa Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-10 19:54:53 +02:00
Thiago Macieira
bea3ae7669 Add QMAKE_NM to the mkspecs
We'll use nm to get the listing of symbols in the next commit.

The -P option is "portable", which sounds like a good idea. I don't
have access to any of the commercial Unix systems, but I do remember
them printing a different format than GNU binutils's nm.

Change-Id: If6f80624bedaf2b1dabf608e16aa097d9910d739
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 16:46:06 +02:00
Thiago Macieira
3ad3939f72 Add objcopy to MinGW's mkspec
Change-Id: I03442f65e281751c8353eca8b987026e9be2437f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 16:46:01 +02:00
Frederik Gladhorn
0eff16611f Merge remote-tracking branch 'origin/release' into stable
Change-Id: I89c251999ae2a82522b40471fd13f2e06b00ece8
2013-06-10 10:00:34 +02:00
Stephen Kelly
04830dbcb2 Strip the -L dirs when processing GL dirs for the CMake files.
The generated cmake files expect only the names of libraries, so the
existence of directories causes erroneous fatal errors when attempting
to use Qt5Gui, if pkg-config returns a -L entry from

 pkg-config --libs egl

Change-Id: Iec50b4be68ab643c3c02abce2435a98e69955138
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-06-06 09:08:41 +02:00
Frederik Gladhorn
248420904f Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ic6e1ae60f891a6b2b568936204d2e84db4177fb4
2013-06-05 15:44:22 +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
Frederik Gladhorn
80604a0786 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/global/qglobal.h
	src/plugins/platforms/cocoa/qnsview.mm

Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa
2013-06-04 19:34:36 +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
96557bc389 move module master header generation back to syncqt
now that we split out the part that depends on the project file, we can
do it cleanly here.
this way we can generate these headers at pre-build time already.
and for git builds, perl is probably faster than qmake at this task.

Change-Id: I343255c6de22329471a3ae2c2aac9ebeb160a501
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:42 +02:00
Oswald Buddenhagen
0519129c59 split out dependencies from module master header
this will allow us the create the dependency list in a different way
than the rest of the master header.

Change-Id: Ib083fbbf6194cd9a161d669f860aaf32fd96d9d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:39 +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
5d8b8eed90 move module version header generation back to syncqt
there is no particular reason for it being done by qmake.
avoids that the logic is distributed over two source files,
and allows us to generate these headers at pre-build time already,
including not forwarding to a yet unexisting file (which would have a
yet unknown location).

Change-Id: I9c78ab425cf6f01d076c86fd1ee602626f231487
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:25 +02:00
Frederik Gladhorn
883951928f Merge remote-tracking branch 'origin/release' into stable
Change-Id: I0a8fe79a80b7720f76e3c0b03cc2c9a769d4009b
2013-05-31 13:47:45 +02:00
Eskil Abrahamsen Blomfeldt
681da4feb3 Android: Fix Windows build with recent SDK
Since the dx tool has moved in the SDK, we need to update our copy
of it to also search in the new location for dx.jar.

Task-number: QTBUG-31405
Change-Id: If093a9f51f33c5d8666919f516a3b336322a7169
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-31 11:43:37 +02:00
Thiago Macieira
3523c9e138 Support setting the library-search environment on a few more OSs
Most Unix systems will honor LD_LIBRARY_PATH (all ELF-based systems
definitely do), so let's not make it an error if the user isn't
compiling on Linux or FreeBSD. The only known exception are Darwin /
Mac OS X and AIX. For everything else, cause an error.

The list of unames came from: http://en.wikipedia.org/wiki/Uname.

AIX does not use ELF, so its variable is called LIBPATH:
 http://publib.boulder.ibm.com/infocenter/forms/v3r5m0/index.jsp?topic=/com.ibm.form.api.configuring.doc/api_configuring_unix_path.html

Change-Id: I67055e6a231aa1430d91431e7cab5f98f0e1bd95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-31 08:05:33 +02:00
Eskil Abrahamsen Blomfeldt
680b6b2192 Android: Compile jar file on Windows
Due to the way the DEX_CMD is formatted on Windows this would break
every time. Since we actually bundle dx.bat in the repository, there's
no need to check for its existence, so the easy fix is just to move
the existence check into the code path where it's run from the SDK.

Task-number: QTBUG-31405
Change-Id: If1aeb744d3abbd2488153b13aac401436965074e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
2013-05-28 19:56:44 +02:00
Oswald Buddenhagen
8ea19caacf add -compile-examples configure option
this overrides the magic that makes examples only install their sources
in production builds.

packagers may want to force the build of the examples, so they can
package them up for demo purposes.
this is actually why we formerly had the split between demos and
examples ...

Task-number: QTBUG-30788
Change-Id: I5633f69404c5aa6846f5496e8f161a273a7a7da3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-26 10:09:58 +02:00
Frederik Gladhorn
d3a8bc803c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qdatastream.cpp
	src/corelib/io/qdatastream.h
	src/corelib/json/qjsonwriter.cpp
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbkeyboard.cpp

Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
2013-05-23 21:27:07 +02:00
Christian Strømme
77c0216369 Android: Added the attribute "extends".
Enables us to detect if a library should be added as a dependency or not.
E.g., libQt5MultimediaQuick_p should only be added as a dependency if an
application is using both QtMultimedia _and_ QtQuick.

Task-number: QTBUG-30861
Change-Id: Id62642c40e2ecca7149d249f65c7b0c950898374
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-22 23:31:46 +02:00
Eskil Abrahamsen Blomfeldt
2cde2fca6f Fix Qt for Android build with recent SDK bundle
In the recent revisions of the Android SDK bundle, the dx
tool has moved from platform-tools/ and into
build-tools/<revision-number> where revision-number is 17.0.0 at
the moment. To enable building on these SDKs, we add
detection for the dx tool and an environment variable which
can be set to override the revision number to provide a way
to build it against future revisions as well.

Task-number: QTBUG-31199
Change-Id: I0d6a22163dc2e50f7a81cd3fe8f3d53c6335aaee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-21 15:24:13 +02:00
Stephen Kelly
c2f2c8a4e7 Check that files we expect to find actually exist when using a cmake package.
Change-Id: If7c724daa85df5e29e410b8deb4e69beb43ee8ea
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-20 15:20:26 +02:00
Ray Donnelly
f1d1b8219c MSYS: use cp -f for QMAKE_INSTALL_*
... in mingw-using specs because msysgit
doesn't provide install.exe and Windows
doesn't care about Unix permissions anyway.

Task-number: QTBUG-31147

Change-Id: Ic8032ca1a970ef41381852b6c5c372b805a124f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-20 10:06:04 +02:00
Stephen Kelly
b911e058fa Only generate entries for private include dirs if they exist.
Change-Id: I1d745adfbae371f8f1f76e954be98f4c2fd962e0
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-14 18:12:20 +02:00
Oswald Buddenhagen
2b3055f7dc remove qtPrepareTool()'s ability to run batch files
it was only meant to automatically support syncqt.bat, which is gone
now.

fwiw, invoking batch files from within msys Makefiles was broken to
start with, as sh cannot directly run them.

Change-Id: I435568c578ce79e46f4e230e985ca9a04b34ffff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:55 +02:00
Oswald Buddenhagen
2c033e00d4 remove pointless extension check from qtPrepareTool()
we never call it with an explicit extension, so this only complicates
matters.

Change-Id: Ib15180130359bb9575bf5dda564f8b817431618f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:52 +02:00
Oswald Buddenhagen
8a78225a33 make qtPrepareTool recognize perl scripts by extension
this makes it possible to directly execute perl scripts on windows.

Change-Id: Ibbb90d46518ea8ac4f695d07141700630b33fab3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:46 +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
Tor Arne Vestbø
1308aa25fb Cache Xcode and SDK settings in .qmake.cache if it exists
The Xcode and SDK settings are expensive to resolve, as we're using
system() calls to resolve them. We now try to detect the presence of
a .qmake.cache file (and inform the user that creating one would be
a good idea), and use the file to cache the various settings after
resolving them.

The Xcode logic had to be moved form xcode.conf as part of the mkspec,
into default_pre/post.prf, so that we could cache() the resolved values.

Task-number: QTBUG-30586
Change-Id: Ib5368cfee6f7e4a4a33f6be70d0e20d96896fe56
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-08 14:07:41 +02:00
Stephen Kelly
3483336889 Only expect EGL libraries in the cmake files if Qt is configured to use it.
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 22:43:14 +02:00
Joerg Bornemann
b378d8ca10 set QMAKE_PLATFORM in win32-msvc2012
Change-Id: I3f43ece757b6f483fde256dbcc00f72b4e71c33e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:03:03 +02:00
Joerg Bornemann
ca354843c8 qmake/vcxproj: add WIN64 macro for x86_46 builds
The compiler defines _WIN32 for x86 builds.
The compiler defines _WIN32 and _WIN64 for x86_64 builds.

For consistency, the same should happen to the user defined macros
without underscore. The WIN32 macro is added in the win32-* mkspecs.

Task-number: QTBUG-30223

Change-Id: I342afed731f4ba253a2708b98f575039a04613d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:59 +02:00
Joerg Bornemann
267dc53ea7 fix _WIN32 compiler defines for MSVC
The compiler defines _WIN32, not WIN32.

Change-Id: I359a188b4ef145b7b78c35c5b72a804200b76507
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:55 +02:00
Sergio Ahumada
db44b891fb Merge branch 'stable' into dev
Change-Id: Ica003a10ede86914bbbb062a2dc277a2ce39a259
2013-05-07 12:02:41 +02:00
Eskil Abrahamsen Blomfeldt
522c7ba1ac Enable bundling Qt in Android package in build system
For bundling Qt, we need two things:

1. We need to build a regular .jar file out of the Java files,
so that they can be built into the app package. Dexing the
classes first (i.e. compiling the JVM bytecode to Dalvik
bytecode) is required for loading the .jar file at run-time,
but cannot be used for building it into the app, so we need
two different paths.

2. We need to specify which extra files have to be bundled for
each module (this is primarily for plugins and imports). This
is because there is no static dependency on these files, so
it cannot be detected during deployment.

Task-number: QTBUG-30751
Change-Id: I733603ee5d1c64bd7c5b9357eb5d993b9d0298f7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-01 11:24:15 +02:00
Frederik Gladhorn
85e3c53e5c Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2a54058b64ac69c78b4120fdaf09b96e025a4c6c
2013-04-29 14:17:09 +02:00
Andy Shaw
3511b199dd Define QMAKE_CXXFLAGS_RTTI_{ON|OFF} for aix-xlc mkspec
Task-number: QTBUG-26393

Change-Id: I2d676ad6004c3fad2ef0a3ab990d6e120ed7f73c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-26 23:26:07 +02:00
Oswald Buddenhagen
940f7c8744 split qt_app.prf out of qt_tool.prf
this way we can use it for "regular" apps (gui tools) as well.

Change-Id: I3b00d0bde215dff1c2726b35626c4c0c256d92c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-26 19:15:25 +02:00
Oswald Buddenhagen
f1fd824ebb make src/ subdir optional
there is at least one examples-only repo (qtwebkit-examples).

we look for tools/ only when src/ is also present, based on the
assumption that if there was only tools/, it would be actually named
src/ (like in qttools). the split between the two is nowadays arbitrary
anyway.

Change-Id: I982b1d0e26dd7d0a5de751546099a58f86390124
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-26 19:15:21 +02:00
Oswald Buddenhagen
fda41c1857 groundwork for making "configure -nomake tools" sane
the idea is that "tools" actually means "graphical applications". that
means that all bootstrapped/build tools are consistently built,
regardless of their location in the source tree.
non-bootstrapped non-graphical tools are a bit of a grey area. it's
going to be decided on a case-by-case basis.

Change-Id: I28b959b7e659d8aa86cf6769ab6d2689c855ec6b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-26 19:15:17 +02:00
Stephen Kelly
3467320378 Don't list all QMAKE_LIBS in QMAKE_LIBS_OPENGL_ES2.
There is no need to, and it confuses the generation of cmake files.

Change-Id: I00c8751990e707cf32652babcb9af3e4b681561a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-23 23:22:43 +02:00
Stephen Kelly
839e275249 Use the CMake list separator for content in a CMake list.
Change-Id: I664c31d256d395d4afec81de66a84dc79ed10b9d
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Stephen Kelly
bc4fbcd215 Add IMPORTED targets for the GL libraries used by Qt.
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.

In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.

This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.

On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.

Task-number: QTBUG-29132

Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
4c231d5df3 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I059725e3b7d7ffd5a16a0931e6c17200917172b5
2013-04-22 16:35:43 +02:00
Oswald Buddenhagen
561e39a845 purge obsolete files
the warnings should have been acted upon before 5.0.

Change-Id: I20a4673d7ec80e0252aa39289c6718fe80799de7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-19 20:10:46 +02:00
Stephen Kelly
a680fe609f Add the GL headers to cmake variables.
If building angle ourselves, that's just the basic Qt include dir,
and if using an external gl, look for it in the places specified
in the mkspec.

As the qopengl.h header includes the gl header, this is a 'public
include dependency' of QtGui, so it is added to the relevant
variable and the INTERFACE_INCLUDE_DIRECTORIES of Qt5::Gui.

Change-Id: I8c2c1782e0a2600032771175444b087da28433fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Stephen Kelly
5aa349628e Handle usr-move without forcing absolute paths
In qtbase commit 7ac58d1ff0 (Make cmake
packages installed to /usr non-relocatable., 2013-02-11), we made
cmake config files non-relocatable if they were installed to
the /usr prefix. That was assumed to mean that this was a distro
or platform package, and was a workaround for the usr-move problem
on Fedora and ArchLinux.

However, cmake bug http://public.kitware.com/Bug/view.php?id=14041
showed that forcing absolute paths in this situation is not desirable
in cross compiling scenarios. CMake commit 6c613b433c45efb0bb013a6bd668cbb8ac740259
(Handle usr-move without forcing absolute paths (#14041), 2013-04-03)
addressed the problem in CMake, and this commit is an equivalent.

Change-Id: I065a6230bc618aa980fae6ca511ae10df4cd62c2
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Tor Arne Vestbø
8e27fcb3fe Harden check for SDK platform name on Mac OS
We now use an absolute path, to prevent picking up the wrong plutil binary.
In addition we pipe the possible stderr output of plutil and xpath to the
null device, so that the final QMAKE_MAC_PLATFORM_NAME will be empty in
case of any errors, and caught by the isEmpty() check below.

Change-Id: I8ad24bf63162a76410c2ae223dd2fc48e7886bbf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-18 22:02:18 +02:00
Ray Donnelly
e345b35ee4 Android: Fixes for building under MSYS.
Need to set MINGW_IN_SHELL to 1 and QMAKE_DIR_SEP to /

Change-Id: If470f1a4617555d6bc551e8cdf917779d0e64e62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-17 20:10:27 +02:00
Frederik Gladhorn
94758589fe Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-04-17 10:28:21 +02:00
Stephen Kelly
0084272c5c Don't use the CMake MinGW if cross-compiling.
This way, the default generator is used when cross compiling
for mingw.

Change-Id: Ie536f1bca35ea38aec1232cdd95fc063c4f23e70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
2013-04-16 19:45:11 +02:00
Tor Arne Vestbø
35d0e9b66f iOS: Don't mangle QT_ARCH when being more specific about what arch to build
On iOS the compiler expects archs like armv6, armv7, armv7s when passed the
-arch flag, or when the ARCHS Xcode variable is set. Instead of mangling
QT_ARCH, which is used other places and assumed to match the values
provided by the arch.test, we use our own variable.

Change-Id: I05e10be8d69dd4d7cbcef04640fef99f1efb253d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 09:01:32 +02:00
Bjoern Breitmeyer
59f1152ec7 added QMAKE_EXTENSION_STATICLIB to wince mkspec
Qmake requires the information which extension is
used for static libs on a platform. As the ci for
windows ce is pretty new, this was not noticed before.

Change-Id: I45b0c9c59980cd352371c00aa59502e5a394e337
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-15 15:32:40 +02:00
Samuel Rødal
b64c9a89da Added qtwaylandscanner rules to wayland-scanner.prf
In preparation of change in qtwayland.

Change-Id: I337ea9f48bf692f31e406c47d9256ee0263d33f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-15 13:17:26 +02:00
Tor Arne Vestbø
78f3c1fb8e Make QT_CPU_FEATURES a map of features based on architecture
For now there's only one architecture per host/target, but
this will change once we start detecting the CPU features
for both device and simulator on iOS.

For convenience we set QT_CPU_FEATURES to the resolved
value of the current architecture, so that simd.prf still
can use QT_CPU_FEATURES directly.

Change-Id: I28e8b339a5c30a630e276165254dba09a3da6940
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-13 18:36:46 +02:00
Tor Arne Vestbø
c002a27426 iOS: Don't quote -force_load, it broke when generating Makefiles
Instead we pass the -force-load as a single argument to the linker,
which is not mangled/touched by either the Xcode or Makefile generators.

Change-Id: I72e17638f0a4a8308a352d4b2033c1b5a9b65b84
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-12 14:16:36 +02:00
Frederik Gladhorn
aa3754d105 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Iee73c93067c5822d8dd51a8692e6da9df4ba49f5
2013-04-12 12:53:13 +02:00
Stephen Kelly
d6d2f60137 Minimize the contents of the INTERFACE_INCLUDE_DIRECTORIES
The property only needs to contain the direct include dirs of
a target. For example, Qt5::Gui does not need to contain the
include/QtCore directory because it already has Qt5::Core in
its LINK_INTERFACE_LIBRARIES.

Change-Id: I69612f42c29e6056b3d15399498d041d43a0dd6b
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 16:09:01 +02:00
Eskil Abrahamsen Blomfeldt
6823f43bbc Android: Remove qdevice.pri warning in configure step
Use the appropriate way to load the .pri file which also
checks for its existence before loading it.

Change-Id: I7d36da1593bb7fa1b5f6fd4d10b69e20c6aaa836
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-11 13:36:17 +02:00
Stephen Kelly
aeaab5210f Generate Win64 code when testing 64bit Qt on Windows.
This should fix the issue reported here:

 http://thread.gmane.org/gmane.comp.lib.qt.devel/10746

From:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6590/focus=6593

Change-Id: I523de5c1a89f08bd832a684fcff7c57565ebc5c9
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-10 21:11:15 +02:00
Stephen Kelly
f29b793508 Use CMake facility for verbose makefiles instead of an env var.
It should also have an effect for Visual Studio project files, not
just makefile generators.

Change-Id: I395071f09b29a6e8967a3d44e41d30480ae783f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 17:51:51 +02:00
Sergio Ahumada
90297a64f2 Merge branch 'stable' into dev
Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
2013-04-10 15:42:22 +02:00
Tor Arne Vestbø
537a4bc401 Don't duplicate SIMD QMAKE_CFLAGS for Clang
The correct CFLAGS are already present in gcc-base.conf, which is
used as a basis for g++, LLVM, and Clang.

Change-Id: Ic19e28edc55e109ecfe372826b295b817afcd36e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-10 11:47:05 +02:00
Morten Johan Sørvig
54d25d53fe Add keys required for ad-hoc distribution.
Change-Id: I3e52cc0105e8d9d5a38e59b1f6e1071fe302f61c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-09 23:10:05 +02:00
Tor Arne Vestbø
f73a7ca46c Verify Xcode installation more thoroughly before relying on it
We depend on Xcode for building Qt itself and user application on Mac OS.
The user may have an Xcode install that is not set up properly, in which
case we would fail compilation in mysterious ways. Instead we try to
detect misconfigured or missing Xcode installs as early as possible.

We try to detect if an Xcode install has not been chosen yet, and
if the user has not accepted the Xcode license agreement. We need to
do these checks both in configure, as early as possible, and in mkspecs
on Mac OS, as we need to error out if the user tries to build an app
with the Qt SDK, but with a broken Xcode install.

Change-Id: I4e3a11077a61dc5d4ee2c686d01044a9bb2c1c79
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-09 10:03:26 +02:00
Tor Arne Vestbø
4f002f3256 Use absolute paths for Xcode helpers such as xcodebuild/xcrun/xcode-select
We always use the xcodebuild/xcrun/xcode-select binaries in /usr/bin,
as these will dispatch to the right binary based on what Xcode version
has been chosen using xcode-select -switch. This fixes an issue where
a tool was in the path from another Xcode installation. We can rely on
the tools as they are present on a clean Mac OS install.

Change-Id: I1d3cc1e92604f9be6d6f14639cb6322234edd696
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-09 10:03:20 +02:00
Tor Arne Vestbø
ced5e2f0e8 Handle errors when sysrooting tools on Mac
xcrun will spit out errors to stderr and nothing to stdout if it fails
to find the tool in question. By checking for an empty return value and
skipping the sysrooting we guard against mangling the tool variable.

Change-Id: I68f59a6c8116696dd75cceed7b33ac666f3468b2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-08 17:23:15 +02:00
Volker Krause
e6bade8f87 mkspecs are installed to QT_HOST_DATA instead of QT_INSTALL_ARCHDATA.
These are the same for normal builds, but differ when cross-compiling Qt.

Change-Id: I75eccc6f4b67b440a08c4aba41aabb7df686c9f9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-08 17:23:15 +02:00
Tor Arne Vestbø
3d0a60aaa4 Enable C++11 on OSX when using Clang
This means we have to bump the deployment target to Lion (10.7), as the
LLVM 'libc++' C++ standard library does not support Snow Leopard (10.6).

For iOS the deployment target has to be bumped from 4.3 to 5.0, but we
don't enable C++11 by default yet as it's not tested enough on iOS.

Users who wish to deploy to 10.6 need to build their own Qt,
passing -no-c++11 to configure.

Change-Id: I7b5d20ab002db889d1091a4b7ff600f62caa7f06
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-05 14:23:23 +02:00
Stephen Kelly
30d01db3a5 Test that the CMake files create appropriate version variables.
Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-05 14:20:39 +02:00
Stephen Kelly
f8ff5263ac Don't redundantly define cmake package *_VERSION variables
These variables are set by the ConfigVersion.cmake file already,
so no need to maintain them manually in the Config file too.

Change-Id: I73d949fb22052f4f6acbc1f70518e73f8fbf7c9c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-05 11:29:26 +02:00
Stephen Kelly
70420ec3e7 Look for cmake package dependents only in the parent directory.
Fedora uses configure options to set the install prefix to a location
which does not contain the cmake config files. Rather than finding
dependencies from the installation prefix, find them in sibling directories
instead.

Change-Id: I06974e9655d0dda2a18064d0f9a33997cf2cb2d3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-05 11:29:17 +02:00
Ray Donnelly
239252d917 Fix pathing problem with our dx.bat
Need to look in <android-sdk>/platform-tools/lib for dx.jar

Change-Id: I104cf157ce1795e907cca31b37c62163248b8d77
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 11:12:29 +02:00
Tor Arne Vestbø
05b0565e97 Include PRECOMPILED_DIR in dirs fixed by fixExclusiveOutputDirs()
It's written to qmodule.pri by configure with a hard-coded path,
and hence need fixing up or appending, depending on which
exclusive builds are used.

Change-Id: I069c04438dc303868a76349c9bdd385adc074c0a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-03 18:04:37 +02:00
Frederik Gladhorn
8b99445755 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-04-03 17:42:03 +02:00
Tor Arne Vestbø
b2d7168313 Load sdk.prf first, if enabled, so that other features can use QMAKE_CXX
Extra-compilers such as objective_c.prf may reference QMAKE_CXX, so we
need to sysroot it before it's used.

Change-Id: I1e367b3d0816096300a441786619f298134de0a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 17:16:43 +02:00
Frederik Gladhorn
a4121a21c0 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
2013-04-03 15:43:39 +02:00
Frederik Gladhorn
814f713f01 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Id96d4076610366a7cc66c8d8382ca25c33eaa71d
2013-04-03 14:40:26 +02:00
Ray Donnelly
7b92a84f03 Android: Portability fix for java usage on Windows.
Change-Id: Ic72957e21b2edc92d2ca8d99099f221ffeeb8c95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 00:37:48 +02:00
Ray Donnelly
b8c355bad2 Android: Enable the java feature on Windows.
There is a bug in dx.bat in the Google Android SDK tool where
relative paths do not work correctly. We need to use our own
version of this tool until:
https://android-review.googlesource.com/#/c/52680/
..is merged.

Change-Id: I451a3239590919d014a673f3e8e17244e96676ab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 00:37:48 +02:00
Ray Donnelly
ff58c27347 Android on Windows: Add 2 missing qmake variables.
In order to build Android Qt on Windows via
cmd.exe using the unix makefile generator,
mkspecs/common/shell-win32.conf needs
QMAKE_SYMBOLIC_LINK and QMAKE_LN_SHLIB

Change-Id: I1b3eded66cec06ab131f127c1d46b99124613561
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 00:37:48 +02:00
Oswald Buddenhagen
779516957a move the setup of QT_INSTALL_DOCS from qdoc to qt_docs.prf
this is a qt specific option and really should not be hard-coded.

also, the implementation used undocumented api that is internal to the
bootstrapped process, which made it impossible to de-bootstrap it.

Change-Id: If706960671744e64a9a7c366437977a800a6058e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-02 19:00:27 +02:00
Oswald Buddenhagen
0aa0093479 prefer 'release' for non-bootstrapped host build_all configs
... like qt_tool does. otherwise we get linker errors with debug builds
on windows.

Change-Id: I583f277ff3fb75c9fe5f305a6f1b5d066b840c07
Reviewed-by: Debao Zhang <hello@debao.me>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-02 18:58:24 +02:00
Tor Arne Vestbø
d817da8797 iOS: Specify framework dependencies in the right place
Instead of unconditionally linking to Foundation, UIKit, and QuartzCore,
we leave the dependencies for the iOS platform plugin, where the libs
are actually used.

Change-Id: Ie8cfad2c8230d1f1af6933b831e443fecb0c93f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-31 23:46:37 +02:00
Axel Waggershauser
5fcf441392 Fix '=' alignment and replace tabs in *.conf (whitespace only change)
Replace all tabs with proper space characters and consistently align
the '=' characters. The default alignment for the '=' of 25 characters
has been left as is to get a minimal diff. Lines with the '=' further
to the right and those belonging to 'proper code (TM)' have not been
touched.

The work was mostly done using the following python script (might
come in handy again...):

import sys, re
indent_eq = 25 + 0*4 # 25 characters was the most widely used indentation for the '=' character
p = re.compile(r'(\w+)[ \t]*([\-\+]?)(=$|= )[ \t]*(.*$)')

for fn in sys.argv[1:]:
    with open(fn, 'r+') as f:
        lines = []
        nl_count = 0
        continuity_indent = None
        for l in f:
            m = p.match(l)
            nl = l
            if m:
                n_spaces = max(m.start(3), indent_eq - 1) - len(m.group(2)) - len(m.group(1))
                if m.group(2) and m.start(2) >= indent_eq-1 and m.start(2) % 4 == 0:
                    n_spaces -= 1 # left-shift '+=' by one if the '+' is aligned to a multiple of 4
                n_spaces = max(1, n_spaces) # we want at least one space before '='/'+='
                nl = m.group(1) + ' '*n_spaces + ''.join(m.group(2,3,4)) + '\n'
                continuity_indent = nl.find('= ') + 2 if l[-2] == '\\' else None # remember indent on '\\$'
            elif continuity_indent:
                nl = ' '*continuity_indent + l.lstrip()
                if l[-2] != '\\': # check when to stop the continuation
                    continuity_indent = None
            elif l.startswith('#'):
                nl = l.expandtabs(2)
            if l != nl:
                nl_count += 1
            lines.append(nl)
        if nl_count > 0:
            print fn, nl_count, len(lines)
            f.seek(0)
            f.writelines(lines)
            f.truncate()

Change-Id: I1d2870d0a2fe2e30d398c140fe523e69dd20c81b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-27 17:16:37 +01:00
Stephen Kelly
ec37cdbc80 Populate includes, defines and pic flags in target interfaces.
Used by features in CMake 2.8.11.

This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.

Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-27 14:54:49 +01:00
Volker Krause
a3f74835f8 raspberry pi: add /opt/vc/include/interface/vmcs_host/linux to GL includes
This matches upstream changes on https://github.com/raspberrypi/firmware/

Change-Id: Ie28c2fa574d5cd097c033926970db40e8904e42e
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-03-27 08:36:10 +01:00
Stephen Kelly
ea1b1efbc1 Revert "Don't duplicate the 'top-level' include dir in all modules."
This will likely fix some odd cmake related tests in the CI.

This reverts commit 316d8ececa.

Conflicts:
	mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
	src/corelib/Qt5CoreConfigExtras.cmake.in

Change-Id: Ib7714746f96bf12061d92242a42296d200c56c00
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-03-26 13:07:14 +01:00
Stephen Kelly
7fb3c6bf3d Fix the CMake tests with CMake release candidates.
The version number parsing needs to handle the reported version string.

Change-Id: Ifd34b2c86b21a1c5e4c91a43447468ca6feab8cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 13:07:08 +01:00
Stephen Kelly
be431cc50a Get more information from failing cmake tests.
Enable verbose makefile output which will appear in failure logs.

Change-Id: I005069c122f46887f6095034d9cf1a3d2fdbc750
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 10:18:02 +01:00
Axel Waggershauser
1622dca213 Fix whitespace issues in *.prf
Replaced tabs with spaces to align with space-indented code
and removed some trailing whitespace.

Change-Id: I4930afc3df206ef8ee96de3e69f0d69fc4a1c77c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-22 19:52:26 +01:00
Janne Anttila
98e704a2da Update WEC7 ARM mkspec.
Added QT_NO_CLIPBOARD, QT_NO_ACCESSIBILITY and opengles2 libs.

Clipboard and accessibility are not supported in WEC7.
Opengl ES2 libs are required for building qtgui (and other opengl
dependent) modules.

Change-Id: Ie45612bd7bada00bfcb92a0885c4bd685b82bd02
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-22 13:21:44 +01:00
Oswald Buddenhagen
0127adbe2c ensure that each module has a .qmake.cache when properly qmake'd
this makes properly configured modules (whose top-level project file was
evaluated) uniformly recognizable.

Change-Id: Ib127df2becb2ff7f51ee8cc5a194ff168b41c227
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-22 09:44:25 +01: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
Sergio Ahumada
e5a11fbb32 Merge "Merge branch 'dev' into stable" into refs/staging/stable 2013-03-20 23:30:31 +01:00
Stephen Kelly
4dacf1488d Require cmake package dependencies to have a minimum version as found package
This way find_package(Qt5Svg 5.1.0) will require Qt5Core 5.1.0 or later, for
example.

Additionally, forward the EXACT keyword to find_package dependencies
so that find_package(Qt5Svg 5.1.0 EXACT) will reject Qt5Core 5.2.0, for
example.

Change-Id: I302f5a3a683e6c36ef42f1e81c5f7e6258cf5624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-20 23:28:33 +01:00
Oswald Buddenhagen
8bfbaa4178 activate example (non-)build magic only in configured trees
otherwise we assume that the user is trying to build a random example
which just happens to live inside a qt module's repository.

Task-number: QTBUG-29756
Change-Id: I17f217b4235fbe04f2c49d1d92ce08b86bb259b9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-20 19:04:45 +01:00
Oswald Buddenhagen
e79e1c1a16 pass module version to syncqt
this is cleaner than having it parse qmake project files.
the only remaining built-in version extraction is the fallback to
qglobal.h needed for bootstrapping.

as a "side effect", this fixes the build of modules with mismatched
versions centralized in .qmake.conf, as this was simply not handled so
far.

the -mkspecsdir syncqt option goes away, as there is no use case for it
any more.

Task-number: QTBUG-29838
Change-Id: I6912a38f0e93a26bc267a9e3d738506fd3ad431b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-20 19:03:45 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Laszlo Papp
8d8f5de441 Use quotes for the error message and remove a line break for cohesion
Change-Id: Id0964ee2a084d721051338f4c2587acb7d1b1cde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-19 14:53:09 +01:00
Stephen Kelly
bc1fb206bb Run CMake dbus tests if dbus is expected to be available.
Instead of first finding it and then testing that we can find it.

Change-Id: I1a1090693520b1d6adadef93839f25d277947e76
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-19 11:26:41 +01:00
Stephen Kelly
4111a676f1 Make the qtbase cmake tests work without the Widgets module.
Task-number: QTBUG-28540

Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-18 20:17:10 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Oswald Buddenhagen
898e701b4a bring bootstrapped QT magic from qt_tool to qt_module
project files of bootstrapped modules can, just like those of
bootstrapped tools, benefit from automatic adjustment of QT (and
CONFIG).

Change-Id: I83815e69a2b105caaee0c2e2602828f8eb425eef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-16 00:12:47 +01:00
Oswald Buddenhagen
b6f8557af8 fix LD_LIBRARY_PATH setup of check targets
amends 4c34b418

Change-Id: Id9d214fe936d947aaea4a56fd724ad50381032e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 18:04:23 +01:00
Oswald Buddenhagen
1b00363b2f fix replacement base path
this affects only webkit when doing module-by-module installation, so it
went unnoticed.

Change-Id: Iab87f4a76fcb0fa9a1b1d6bcab9a73756e416120
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 18:03:27 +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
457afb3749 fix parallelized "jom install"
unlike unix' mkdir -p, windows' md complains if the directory already
exists. the workaround is a quite complex command, so the so far used
concept for assembling the command line from pieces was replaced with a
single template. for symmetry, adapt the makefile existence check to the
new concept as well.

QMAKE_CHK_EXISTS and QMAKE_MKDIR_CMD were added, with hard-coded
fallbacks (ugly).
QMAKE_CHK_FILE_EXISTS and QMAKE_CHK_EXISTS_GLUE (introduced in 5.0.0)
are simply deleted again.
QMAKE_CHK_DIR_EXISTS and QMAKE_MKDIR remain for legacy reasons, as qmake
emits them into the Makefiles, and custom commands may rely on their
presence.

Task-number: QTBUG-28132
Change-Id: I3d049cb5d26947e5c3d102d0c2da33afb2a95140
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-03-15 18:01:57 +01:00
Oswald Buddenhagen
d9ba123c6e append $$QMAKE_DEFAULT_INCDIRS to moc invocations
unlike the real compiler, moc does not have these directories built in,
so it would not find headers from a system install of qt.

Task-number: QTBUG-28870
Change-Id: I86f18cdc8953145190163746dae59f4e784f2d78
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 17:58:06 +01:00
Oswald Buddenhagen
b965c30071 de-duplicate code a bit
Change-Id: I35cd81e308c512bdec50de1f19ae9c708012afa0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 17:58:02 +01:00
Oswald Buddenhagen
72e81619d9 remove overuse of $$list()
Change-Id: I383b0af8c37acd9dc34a8cf5718f4d850099b64b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-15 17:57:59 +01:00
Stephen Kelly
67de2905b0 Join the CMAKE_PREFIX_PATH components into a cmake list before use.
Change-Id: I16e05b72e57473239b89498313ba7745ffa6a346
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-15 10:04:15 +01:00
Oswald Buddenhagen
d3d8ac3546 don't bootstrap tools when not necessary
bootstrapping is only necessary if we are cross-compiling or have a
circular build dependency.

Change-Id: I17244457652ca9d4fc797043e57070c2ae3ee5d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-14 19:49:38 +01:00
Tor Arne Vestbø
b32a6384b3 iOS: Don't warn about using C++11 extensions
Qt uses a lot of minor C++11 extensions such as long long, commas at the
end of enumerator lists, and extra ';' outside of a functions, and not all
of these can be silenced, so we build without warnings for C++11 extensions,
since we plan to enable C++11 at some point anyways.

Change-Id: I3ede2fb653c25475a3bd2b860c0c80c6cf6abef5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-14 19:49:38 +01:00
Tor Arne Vestbø
7015b464c0 Fix interaction between sdk.prf and silent.prf
The 'silent' option to CONFIG will mangle QMAKE_CXX and friends by prepending
an @echo, which sdk.prf doesn't handle (it assumes the variables contain
names of executables, with optional arguments). Instead of teaching sdk.prf
generic command line parsing we ensure that silent.prf does its job at the
very end, when the tools have already had their paths fixed by sdk.prf.

Change-Id: I7093232e5cc37ed8106a3b838f42ad8f1a43fb86
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-03-14 19:49:38 +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
Tor Arne Vestbø
c45595d648 Use tools from the SDK's toolchain instead of the ones in /usr/bin
For Mac OS X we currently specify build tools without an absolute path,
which means we end up using the ones in /usr/bin. This is wrong, we
should be using the tools from the toolchain of the chosen SDK.

For iOS we do specify an absolute path, by resolving the toolchain
path in the iOS makespecs.

To solve the situation on Mac OS X, we move the logic of resolving the
toolchain path to sdk.prf, and share it between OSX and iOS.

For configure we need to duplicate some of the logic from sdk.prf, as
configure pulls out QMAKE_CC and QMAKE_CXX for running some initial
tests and building qmake. The new macSDKify function also solves
the issue of missing sysroot and deployment version in the flags.

Change-Id: Ib1d239c9904cf3ccee5214b313cf6205869a1462
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-13 18:40:26 +01:00
Tor Arne Vestbø
e11c2165c5 Simplify how we resolve the SDK root on Mac OS
We now take advantage of the fact that xcodebuild -version allows you to
pass the key that you're interested in, to only print that single value.
This technique is used by Apple's own build scripts as well.

Change-Id: I57b8424590d4137a0e7f263a318e17ee2e0dfad4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-13 18:40:26 +01:00
Konstantin Ritt
0194fa135b Hide Harfbuzz from the outer world
Don't export, don't generate private headers, don't mention HB in API.

Change-Id: I048ebd178bf4afaf9fda710a00933b95274cf910
Reviewed-by: Josh Faust <jfaust@suitabletech.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-13 14:46:26 +01:00
Oswald Buddenhagen
2796ceff50 make QT setup for bootstrapped tools more clever
instead of simply overwriting it, intelligently re-interpret it.

Change-Id: I5f7d8fff69ac8092653d7583da4c3884b9864b3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 23:11:36 +01:00
Oswald Buddenhagen
cd94b543cb make qml_plugin.prf usable without a parent c++ module
so far the assumption was that every qml plugin/module in qt is a
wrapper/extension of a corresponding qt module. this not the case for
the upcoming quickcontrols, for example.

Task-number: QTBUG-28200
Change-Id: If4b8bb6633e76b2a510908d09a010cee12d33634
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:13:37 +01:00
Oswald Buddenhagen
a05cedd70b remove redundant code
amends bb6b2f407

Change-Id: Ib56c502350bf46db352fb36d0ce46b6eb7c8ff58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-12 18:13:37 +01:00
Tor Arne Vestbø
ae39a84603 iOS: Move arch handling out of ios.prf now that we have default_post.prf
Change-Id: Ifad6463414d4fb055007653d06f2c17ca5ee953e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-12 18:13:37 +01:00
Gunnar Sletta
5f25dc6be7 Don't force disable accessibility
Change-Id: I75a2d4565272bbcd27ec4ca9a3806a4c114c3442
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-12 07:04:16 +01:00
Gunnar Sletta
cbb1be5ea9 Remove Q_OS_LINUX_ANDROID.
It is unused in the source code and replaced by Q_OS_LINUX,
Q_OS_ANDROID and Q_OS_ANDROID_NO_SDK depending on usecase.

Change-Id: If8d561540e7583fbac83c0f3506f219c4433e847
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-12 07:04:06 +01:00
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Samuel Rødal
c2f17ad937 Fixed build of SSL when using android-no-sdk.
Introduced Q_OS_ANDROID_NO_SDK which makes more sense than
Q_OS_LINUX_ANDROID when Q_OS_ANDROID also defines Q_OS_LINUX.

Change-Id: Id2aa228b66daffba82776a12c91a264a360afd86
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 09:18:43 +01:00
Rafael Roquetto
d1308232d3 Qnx: Add BlackBerry Playbook config token
Change-Id: I31367b6c9b20fdfce1c60c4b9f0b213aba1872e4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-06 21:50:28 +01:00
Tor Arne Vestbø
a8021ed985 Fix Xcode version lookup in xcode.conf
We want the second member from 'Xcode 4.x', and $$first() gave us
'Xcode' instead of the version number.

Change-Id: Iaf0ed9dc89a03f7918290a61bddade82651ad0f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-06 19:02:16 +01:00
Oswald Buddenhagen
b4d3047422 require modules to define their version
otherwise they would inherit it from qtbase, which may effectively
result in a lie if building against a different release.

for convenience we define the version centrally per repo.
qtbase is special, in that we use the version defined in qglobal.h to
avoid defining it redundantly (the instance in qglobal.h is currently
needed to bootstrap qmake; the configures would need some work to change
this).

Task-number: QTBUG-29838
Change-Id: Ie9a5b0ff0d64b69ff2d34af2f7c42d6278e957cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 18:01:13 +01:00