Commit Graph

707 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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ø
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
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
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
Frederik Gladhorn
b861063873 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-03-06 00:11:52 +01:00
Tor Arne Vestbø
d28073d9eb Distinguish between 'mac' and 'macx' qmake scopes
The former applies both on Mac OS X and iOS, but 'macx' is specific to
Mac OS X.

ios.conf and macx.conf now share most of their settings in the common
mac.conf. We set the default QMAKE_MAC_SDK before loading mac.conf, so
that any overrides in the device config will apply afterwards. This
means configure's mkspec parsing will be able to read the QMAKE_MAC_SDK.

Change-Id: I0c7e26a6a0103e19b23ef152aa9e4ab461cee632
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 20:59:45 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Paul Olav Tvete
97fcf3bc98 Introducing the Qt Android port
Based on the Necessitas project by Bogdan Vatra.
Contributors to the Qt5 project:

BogDan Vatra <bogdan@kde.org>
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
hjk <hjk121@nokiamail.com>
Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Paul Olav Tvete <paul.tvete@digia.com>
Robin Burchell <robin+qt@viroteck.net>
Samuel Rødal <samuel.rodal@digia.com>
Yoann Lopes <yoann.lopes@digia.com>

The full history of the Qt5 port can be found in refs/old-heads/android,
SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d

Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-05 08:31:23 +01:00
Tor Arne Vestbø
93c6284696 Make host_build re-use the sdk.prf logic
Instead of hard-coding the SDK and deployment target.

A host build will already use the host-makespec, so now that we
always build against an SDK, these mkspecs will have the SDK and
deployment target set.

Change-Id: I2b0343ae75f7de12081bab8346307b96b3883f62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-02 12:58:18 +01:00
Thiago Macieira
ebfd85a499 Add the infrastructure to compile Qt with -Werror
This is enabled only for -developer-builds and only for certain
compiler-version combinations that are in a whitelist.

It also requires each library, plugin or tool to declare whether it is
supposedly clean of warnings. When most targets are clean, we can
consider inverting.

Change-Id: I17b5c4e45aee5078f9788e846a45d619c144095a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 23:43:36 +01:00
Tor Arne Vestbø
0520631b2b Merge "Merge branch 'ios' into dev" into refs/staging/dev 2013-02-28 19:22:05 +01:00
Tor Arne Vestbø
b997481fcb Don't look up DOCTYPE when resolving SDK settings on Mac OS
We don't want to hit the network, as a flakey network or slow server will
hang the XML parsing. We assume the XML is well formed.

Change-Id: Idc4898a925a46222954bf633a04ea9fe148c6797
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 19:22:05 +01:00
Thiago Macieira
267567b8da Enable C++11 mode for Qt tools too
Change-Id: Ifb93e6ed1046142a9f57c7546ddf926532efd868
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-28 05:43:25 +01:00
Thiago Macieira
bb6b2f4073 Add qt_common.prf and move some common definitions there
This file is now included by three types of Qt output: modules,
plugins (including QML plugins) and tools.

Change-Id: I5085f6ff37f70e9228303bf0520040adc2e2d7a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 05:43:18 +01:00
Morten Johan Sørvig
ac0f6d1a34 iOS: Fix build for modules that load(configure)
configure.prf checks if MAKEFILE_GENERATOR is set
to something it can work with. ios/default_pre.prf
unsets MAKEFILE_GENERATOR.

This breaks QtMultimedia at least. Add special case
for iOS to configure.prf and set QMAKE_MAKE to "make".

Change-Id: Ie8feaeefe4a932d735a0cd4c09e869ca1341aae5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:55:58 +01:00
Tor Arne Vestbø
5da648043d iOS: Target both iPhone and iPad by default
Change-Id: I3122b9391c6187da17389c889a456c58210dca09
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 13:07:23 +01:00
Tor Arne Vestbø
e846edff33 iOS: Allow projects to disable the main wrapper
In case they provide their own main that calls UIApplicationMain.

Change-Id: Ia050277ae5cbcbf01bc57b87ec37a74db9568059
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 13:07:22 +01:00
Tor Arne Vestbø
5b99d46b39 iOS: Link to the platform plugin and iosmain plugin and define main
Ideally we'd only have to do QTPLUGIN += ios, but this doesn't work as
we need to link with the force_load linker option. Even trying to build
on QTPLUGIN and then replace the -l line with what we need will fail, as
the prl logic in qmake which runs after all the prf files does not know
about the force_load option and will then fail to resolve dependencies
from the prl file.

Since we load the platform plugin using -force_load, there's no need to
generate a cpp file that does the plugin import.

The main wrapper is not a real Qt plugin, and doesn't have an import
function that we can call, so we link it manually instead of relying
on QTPLUGIN.

Change-Id: I0381a3c9ed7f8d41a4121e1fc0b7c0e210a8b832
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 13:07:22 +01:00
Tor Arne Vestbø
77168c03ff iOS: Make Xcode output the default for GUI applications
As long as Qt Creator does not provide any iOS integration, and the
app bundle we create using the Makefile generator is not good enough
to deploy to a device anyways, producing Xcode projects make the most
sense.

We base the decicion on whether or not the project depends
on QtGui and has app_bundles enabled. This prevents configure
tests and other tools from having Xcode projects, but allows
examples and demos to build out of the box.

Instead of setting the generator unconditionally we unset it in
default_pre so that we can detect if the user set it manually. This
means the user won't be able to inspect the MAKEFILE_GENERATOR variable
from the pro file, but this is less of a use-case then overriding the
generator from the command line or prooject file.

Change-Id: I881cf3e29631445f83ea4ff0979f7a566e4810f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 13:07:21 +01:00
Tor Arne Vestbø
c3278e3353 iOS: Replace device and simulator makespecs with single makespec
And use configure's -sdk argument to choose between the iphoneos and the
iphonesimulator SDK. xcodebuild -showsdks can be used to list the
available SDKs. Passing an SDK without a version postfix implies
the latest version of the SDK.

Change-Id: I881df754d522fc91aaa16ba3e39cf0c37a21a1f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 13:07:16 +01:00
Stephen Kelly
97e755945c Automatically find external dependencies in cmake tests.
Currently the Qt5_MODULE_TEST_DEPENDS variable is maintained individually
in each repo. This patch makes that obsolete.

Change-Id: I1a72bb4da70b9ace6f79296d6a3fb295eaa999ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-25 23:33:16 +01:00
Stephen Kelly
cdca61f09a Extract some cmake related functions for re-use.
These will be used by ctest_testcase.prf.

Change-Id: I8a0e6e1eb110daba41b007c8309f3cb9a2059ecb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-25 23:32:53 +01:00
Friedemann Kleint
a8fce5d6e2 ANGLE: Fix static build.
Introduce  QT_OPENGL_ES_2_ANGLE_STATIC define for static builds
and modify export accordingly. Provided static instances
of gl::Current and egl::Current for Qt's single threaded
use.

Task-number: QTBUG-28196

Change-Id: Ia75699d6da103fb8dd9d5fe97c1ee51e48a74406
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-25 10:34:11 +01:00
Tor Arne Vestbø
736e4258a1 Use sdk.prf to set macosx-version-min instead of static conf files
Allows us to dynamically generate the command line option for iOS later,
and allows the user to override QMAKE_MACOSX_DEPLOYMENT_TARGET with the
expected effect on the command line options.

We unset PERL5LIB to ensure we get the system Perl libraries, since the
Mac OS 10.6 CI machine seems to have a broken XML::Parser::Expat from
macports/CPAN.

Change-Id: I04430c7b1daf9452d72f9a04a6b7f8d0d6926884
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 19:23:26 +01:00
Stephen Kelly
298f0b6573 Fix indentation.
Change-Id: I7d5e5549b265507f412c991087ebbec8f6abcc0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 18:34:35 +01:00
Stephen Kelly
d7ae34fdfd List the Release library before the Debug library in cmake files.
This way, the Release library is chosen if Qt is configured to
build both debug and release, and if the consumer configuration
is not an exact match for 'Debug'.

This means that RelWithDebInfo and MinSizeRel, which are 'standard'
configurations in CMake with mulit-configuration generators, will use
the Release version of Qt. All other configurations will also use the
Release version, unless MAP_IMPORTED_CONFIG_<CONFIG> is used as
described in:

 http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html

and in the cmake documentation:

 http://www.cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG

Task-number: QTBUG-29186
Change-Id: Ifc11a9e19fcb304297c204e34a3b25c510329767
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-22 08:27:01 +01:00
Stephen Kelly
7661e39c02 Create module-specific internal cmake macros
This ensures that invoking the macro from a different module (operating
on a different target) is not possible.

Change-Id: Idbcd41d03172a8f1dcea26954464ab981fce8879
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:14 +01:00
Stephen Kelly
7477d50fce Populate the cmake variables only one time.
Since we're only including the Extras file one time, invoking set() for
the include dirs again will overwrite the addition of include dirs in
the extras file.

We only need to populate these variables if not set anyway, so do that.

Change-Id: I04dad0674778e79c8c12c18231b8ce6c92edf881
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-21 22:41:05 +01:00
Frederik Gladhorn
dcb710dd87 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/features/unix/separate_debug_info.prf
	src/gui/kernel/qwindow_p.h
	src/plugins/platforms/cocoa/qcocoacursor.mm
	tests/auto/tools/moc/tst_moc.cpp

Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
2013-02-20 22:08:29 +01:00
Oswald Buddenhagen
23762682c1 simplify qtAddModule() by using $$qtPlatformTargetSuffix()
Change-Id: I02b6c1eb2db0c8a36c50b1ec3c79dea215fba03a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
67f20d66e4 remove pointless conditionals and expansions from qtLibraryTarget()
this function is called only from library TEMPLATEs, and always with
exactly one word as the only argument.

Change-Id: I6282e3826791f89e6cf89dde625c8166e4e56028
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Oswald Buddenhagen
218179ce2f don't suppress building examples in non-prefix builds
these have no (useful) install target, so it makes no sense to reduce
the "build" to installing sources. suppressing the actual build can be
achieved with -nomake examples instead.
conversely, as the build dir is the install dir, people actually need to
be able to (selectively) build examples in there.

Task-number: QTBUG-29756
Change-Id: I98f34235442b552e51c0d5f5cec96a3eab4f1e7f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-20 15:22:55 +01:00
Tor Arne Vestbø
71b4325cb7 Clean up how we build against SDKs on Mac OS
Instead of setting -isysroot in both arch.test, compile.test, the various
mkspecs, and sdk.prf, we now propgate the chosen SDK as the qmake
variable QMAKE_MAC_SDK, which is then handled exclusivly in sdk.prf.

The QMAKE_MAC_SDK variable, and -sdk argument to configure, is expected
to be of the short-form name, eg macosx or iphoneos, not a full path, as
that's what Xcode also expects. We take care of translating that into
a full path for -isysroot/-syslibroot in sdk.prf, using xcodebuild as
a helper.

Change-Id: I281655b2fa5180c6e78ffdce36824e4a91447570
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-19 07:56:34 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Oswald Buddenhagen
489d8a0627 add QT_CONFIG's static/shared to CONFIG on startup
... instead of as a fallback in default_post.
it was this way in qt4, and it requires less code to be written in the
end. we are already doing it for debug/release as well.

Change-Id: I6e02849d61d14a18375cf64a5990768931ebac48
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:43 +01:00
Oswald Buddenhagen
2e4ce301f9 take advantage of new safety regarding build config resolution
all tests that happen after default_post loads resolve_config can rely
on debug vs. release, static vs. shared, and staticlib vs. dll being
properly "de-conflicted".

Change-Id: Ie0b4defcd6024bd1c25f53ba7e03621052d96492
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:39 +01:00
Oswald Buddenhagen
9dcbfc1c44 refactor build config resolution
the current approach of having "free-flying" prf files for such a core
issue is rather insane. this was noticed early on, as evidenced by the
forcible loading of debug/release/debug_and_release in default_post.
however, things remained a mess, in particular static vs. shared.

consequently, the commit merges all related feature files. the actual
config resolution is put in a separate feature file, so it can be loaded
by resolve_target if that happens to be loaded early on.

Change-Id: Ie30e7c63cabe9409a3263ca1650e323a870926f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:36 +01:00
Giuseppe D'Angelo
e88011357e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-17 20:31:38 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Stephen Kelly
7ac58d1ff0 Make cmake packages installed to /usr non-relocatable.
This is for dealing with fallout from the UsrMove:

 http://fedoraproject.org/wiki/Features/UsrMove

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5327

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5868/focus=5907

Change-Id: I6380e3bad17a016a8252b615ce962e3008a5d809
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-14 08:20:00 +01:00
Oswald Buddenhagen
172b381307 purge QMAKE_LIBS_OPENGL_QT
it differed from QMAKE_LIBS_OPENGL only for the irix/sco/unixware -cc
specs for not entirely obvious reasons. as all these specs are obsolete,
remove it.

Change-Id: I7d50ffa11ff830371ea52c9ebe25e1f1bc56b307
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-13 19:42:39 +01:00
Oswald Buddenhagen
e3554d7274 remove useless unset()s
there is mightily little point in unsetting variables right before
unconditionally assigning to them.

Change-Id: I24c1814ce38bf9aab4496679b1a670f3cd55c536
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 12:42:40 +01:00
Stephen Kelly
e95a758236 If the libdir is absolute, make the config file non-relocatable.
If Qt is configured with -libdir /some/dir/outside/the/install/prefix/,
then for use absolute paths for the executables and include dirs too.

Change-Id: I5ccf62be6f93f97d934df62038fe4cd40dca9a93
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-13 01:14:42 +01:00
Oswald Buddenhagen
46f1c12b9e use install path as fallback when locating tools
all non-installed tools are properly registered, so they don't need the
fallback. conversely, we can assume that non-registered tools are
already installed.

this enables us to build docs in qtbase after an incremental
build+install up to qttools.

Change-Id: I95a55f6b84e01885bcf6dd656caf0dd2b679bb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-11 18:00:17 +01:00
Stephen Kelly
b9c1593435 Fix regex for determining if a path is relative.
Change-Id: I3d638220e16c215b737417c2bf8de02ddf4a8199
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-11 15:17:07 +01:00
Stephen Kelly
316d8ececa Don't duplicate the 'top-level' include dir in all modules.
This is the <prefix>/include directory which is independent of the
module and which only has to be used once. As everything uses QtCore,
it is enough to set it only there.

The CI system is a special case, in that it tests things before
installation. Handle that case too.

Change-Id: Idcdf9617e199b7d490cb3553cce07f1f464b3bec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-09 19:35:25 +01:00
Stephen Kelly
aac82954da Include the CMake Extras file and the Macros file only once.
As the Extras file can do things like append to a property (as in
QtCore for include directories), that is something that should be
done only once when the QtCore target is first defined.

Change-Id: I5163912bccfda1ff43a02eb01f67ac59e6f6b24b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-09 15:24:13 +01:00
Oswald Buddenhagen
132ba92ec2 ensure consistent pkg-config file naming for macx qt frameworks
the pkg-config file names follow the TARGET by default. as we create
frameworks without the major version infix, all references to Qt5* would
be invalid.

Task-number: QTBUG-29453
Change-Id: I82e7de017a8f17f7d2d7b4a2a61a180125ca29a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
dcada2a05d beautify the pkg-config Name: field
it's not used for anything other than display, so we can put a space
there.

Change-Id: I77e156856efeaaa964ff3bf2369bcd5586bac7c6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
bf915eeea2 export QT_CONFIG only in Qt5Core.pc
there is no point in duplicating the information in every module.
host_bins is exported only here as well.

Change-Id: I2f816e1cade9761a2c0d97c7ca1c90293095bfb1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
6944c01200 export QT_CONFIG instead of CONFIG to .pc files
users need access to the Qt configuration, not some internals of
module's build system.

Change-Id: Ife3f668282969d444282d57152c11ed0f741076f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Oswald Buddenhagen
04478614c1 fix transitive linking for x-builds
-rpath does *not* imply -rpath-link when x-building:
ld(1): "Searching -rpath in this way is only supported by native linkers
and cross linkers which have been configured with the --with-sysroot
option."

it doesn't hurt to have the "excess" -rpath-link for native builds, so
just remove the cleanup.

Change-Id: Ic39c1f4d6c2e3770d43a5ed3e56cf89a146edf85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-05 22:50:28 +01:00
Oswald Buddenhagen
4c34b418b8 fix lack of rpath-link when using modules from final location
if the libraries are in a non-standard location, but no rpath is used,
rpath-link is needed. this is often the case for non-prefix builds
(which have no forwarding pris any more).

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

Change-Id: I1538b5d531611c76a2d7058a3b2ff683bdcbe427
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:22 +01:00
Sergio Ahumada
256dc059ee Merge "Merge branch 'release' into stable" into refs/staging/stable 2013-02-01 12:31:16 +01:00
Oswald Buddenhagen
06a6d1da58 substitute fixed version numbers in qdocconf files with variables
Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-01 10:23:26 +01:00
Sergio Ahumada
6239af6f0f Merge branch 'release' into stable
Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
2013-01-31 18:55:53 +01:00
Oswald Buddenhagen
6654a05fca don't create forwarding module pris for non-prefix builds
as everything is built inside the common build/install dir, there is
no point in the fwd pri stuff.
as a "side effect", this makes it more straight-forward to relocate
non-prefix builds, which is the default on windows.

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

Change-Id: If40e941afc9293725630ed6bcf3e4ef18a692f66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:40 +01:00
Oswald Buddenhagen
f75e897519 centralize detection of prefix builds
this makes the use sites more expressive

Change-Id: Ib879de65d1cc26462fa61f5339e951f294515faf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:35 +01:00
Oswald Buddenhagen
2b397f985e do not actually build examples in production builds
-developer-build enables an actual build of examples, based on the
assumption that developers want to test it (it can be still disabled
with -nomake examples). regular users otoh want only the examples
sources installed.

Change-Id: Ifc6a108099929175a3960480802b271a758fdd38
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:21 +01:00
Oswald Buddenhagen
839009c74f fix duplicated installation of qml example files
we need to collect the sources of the install targets for the check that
all files have been properly handled, but of course we must not add these
files to the source install target, as that would mean double installation.

Change-Id: I6acb56f2a993b6ed81d1031d5dc0a0da30a53b54
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:03 +01:00
Mark Brand
2be4d6ba02 fix path adjustments in installed metafiles
Task-number: QTBUG-28902
Change-Id: Ia70da8f0f0b7abb4ea2a46cb4068c0827888b322
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-30 15:43:00 +01:00
Mark Brand
6d90c2e9cb adjust paths in installed prl files for mingw
Curiously, qmake could fix .prl and .pc files for unix, but only .pc
files for MinGW. qt_module.prf seems to have known this.

Task-number: QTBUG-28902
Change-Id: Ice9983a69813690c0d4b96ca11589440182569a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-30 15:42:51 +01:00
Mark Brand
0e1427b0a6 adjust paths in installed module metafiles from modular build
Fully modular prefix build now puts the includes and libs into each
module's own builddir, so the else branch was simply bogus. Replaced
the else branch with the real base for modular builds. This allows
the paths to be successfully replaced when installing metafiles.

Change-Id: I056a923288965b560a4e9b0ba7add1aac912199f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-30 15:42:40 +01:00
Oswald Buddenhagen
50a416889e explicitly set QMAKE_PKGCONFIG_NAME
otherwise qmake will just take TARGET and lowercase and capitalize it,
which not only looks weird, but also does not match the Requires: fields
we generate.

Change-Id: I4a070ff256fffd2b780acb0361d4213d0032dbb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dihan Wickremasuriya <nayomal@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-28 16:33:48 +01:00
Oswald Buddenhagen
ca7056ce5b include all module dependencies into pkg-config Requires: field
previously, we'd miss the -private ones (which imply the non-private
version).

Change-Id: Ib5ae2afaa5b5efda9639b7cc4a080432f2fcce2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dihan Wickremasuriya <nayomal@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-28 16:33:48 +01:00
Frederik Gladhorn
02ba93dd3d Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
2013-01-28 11:10:29 +01:00
Oswald Buddenhagen
f329dccb79 use correct module names in pkg-config Requires: field
Task-number: QTBUG-29309
Change-Id: Id22d4e2707ceb3421dc6eb5effe16a03c4769d26
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-28 07:11:49 +01:00
Stephen Kelly
4ce32f664d Use new path manipulation functions from qmake.
This is a less error-prone way to calculate relative paths.

Task-number: QTBUG-29110
Change-Id: If4509ef278e48dcf08bdcc904d21534b4c05993f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-24 15:16:19 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Frederik Gladhorn
7075e29199 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qstyleanimation.cpp

Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
2013-01-16 01:22:45 +01:00
Jonathan Liu
724cb5d30f Support MinGW for CTest test cases
Change-Id: I581701f0b830292a21bc805da0398cbc96f82918
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-09 23:51:48 +01:00
Stephen Kelly
eebf42cc0d The executables always go into QT_HOST_BINS.
Task-number: QTBUG-28922

Change-Id: I7afaee292a0026d67866e4f1f711296adee8f8de
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-09 13:39:04 +01:00
Sergio Ahumada
63f24f6ba8 Merge branch 'stable' into dev
Change-Id: I7f0dab6bdb1f3cc1d3e6c30166ff6db9dfae37e9
2013-01-09 11:49:47 +01:00
Mark Brand
99e5496ff7 fix QMAKE_MAKE for qtCompileTest for cross building modules
Cross bulding on unix for mingw exploits the fact that makefiles
generated for mingw work with plain make. There is no mingw32-make, so
this is the only option.

Arguably, plain make could also be used in an MSYS environment,
perhaps detected by MINGW_IN_SHELL, but there might be good reasons I
don't know about not to do this.

Change-Id: I694c74046a307c2887af1c30cca36f95e242adc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-07 19:57:52 +01:00
Frederik Gladhorn
ca2f44680c Merge branch 'stable' into dev
Conflicts:
	examples/widgets/painting/shared/shared.pri
	src/corelib/tools/qharfbuzz_p.h
	src/corelib/tools/qunicodetools.cpp
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase.cpp

Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
2013-01-04 11:12:05 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
Kai Koehne
7650494143 Fix main() signature of headersclean stub file
Fix MinGW build errors by using the standard main signature.

Change-Id: I0ebe7307a825a7ec50e654f163fbf8fe7060a478
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 14:37:57 +01:00
Oswald Buddenhagen
022a0f0fb3 Merge "Merge 'release' into stable" into refs/staging/stable 2012-12-21 10:38:41 +01:00
Miikka Heikkinen
889e991773 Generalize the check for gui in static plugin import generation
Generalize the check for gui by checking for needs_qpa_plugin
CONFIG value instead, which gui adds to MODULE_CONFIG.

Task-number: QTBUG-28215
Change-Id: I5834a3f81e5c3868ee1a3fa405ebc6410db1f900
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-20 13:59:46 +01:00
Miikka Heikkinen
3a810c8238 Enable forcing generation of static plugin imports
Using some modules requires importing static plugins also for shared
libraries (namely QtAxServer), so provided a way to force plugin
imports even for non-applications using force_import_plugins
MODULE_CONFIG value. This required moving the plugin handling after
qtAddModules calls in qt.prf.

Task-number: QTBUG-28215
Change-Id: Id6bb92ed7c078cc8c54538ddc9bb8e8ad316f277
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-20 13:59:36 +01:00
Stephen Kelly
40474ceb11 Fix the computation of the location of mkspecs.
The location of the mkspecs directory comes from the archdatadir, which
distros will all set.

Change-Id: I20dbdce76db13dbd37eec065009e215f98985907
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-12-20 13:22:02 +01:00
Oswald Buddenhagen
d4a29a53eb Merge 'release' into stable
Change-Id: I57aaa6747c1bfacc7dee036cd69d91a8c0d9ae7a
2012-12-19 19:34:53 +01:00
Oswald Buddenhagen
09331062bb remove some unnecessary CONFIG additions
qt is already added by spec_pre.prf, warn_on and depend_includepath by
default_pre.prf.

Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-17 14:08:17 +01:00
Miikka Heikkinen
4c5584f0a3 Fix installation of plugin module .pris in static Qt builds
When building Qt static, plugins get module .pri file, but those files
do not get installed in Windows. This is because both .pri generation
and install target statements are scoped with !build_pass, which means
Makefile.Debug and Makefile.Release do not get install_pritarget
target.

Fixed by doing only the .pri generation in !build_pass scope.

Task-number: QTBUG-28606
Change-Id: If3f49b578af1d9171a8bce67793ecb3f902a6da8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-12-17 14:08:17 +01:00
Oswald Buddenhagen
d0bce448cf stop defining QT.<module>.sources
it's the very antithesis of modularization to do it.

Task-number: QTBUG-27722
Change-Id: I2540e1a70e67b55420246d0c209314c05c65a85f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-14 16:26:43 +01:00
Stephen Kelly
719ca7c53a Remove win32/thread.prf and thread_off.prf
The variables these files refer to are not set anywhere anymore.

The Unix thread.prf file is still needed, as it is still effective and
is activated by qt.prf.

Task-number: QTBUG-25106
Change-Id: Ia514192d28785205df3710d78ee597285d4136b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-14 16:26:39 +01:00
Oswald Buddenhagen
d454cb08da add .rpath only for dynamic unix builds
rpath is meaningless for static libraries.
and windows has no concept of rpaths to start with.

Change-Id: Ia02bbdfbf7112e7082175c3051c0839ac0900f57
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-14 16:26:35 +01:00
Peter Hartmann
b6250913be QNX: adjust settings for separate debug info feature
Patch-by: Greg Bentz
Task-number: QTBUG-28247
Change-Id: Ibd1f959969a8678b828c8e8de8be0a200a632b22
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Greg Bentz <gbentz@rim.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-13 17:45:32 +01:00
Oswald Buddenhagen
692de02818 add some docu about the project loading sequence
Change-Id: Icb6bb58247724aeb6b9433a8d032718f1ba4babe
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-13 09:10:45 +01:00
Oswald Buddenhagen
8e36b8de02 mark a bunch of features as internal
Change-Id: I5ad28827ff317985414e859263af85ceec31207c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-12-12 21:48:02 +01:00
Sergio Ahumada
b17e030ef5 test: Mark cmake tests as insignificant when -no-widgets is used
Task-number: QTBUG-28540
Change-Id: Iaa238ce8fb857ec8856dd9d6f3adc49795db1de1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-12-11 22:03:00 +01:00
Miikka Heikkinen
d4d2e4b39d Automatically import plugins in all applications with static Qt
Since all gui applications already need some QPA plugin added,
we might as well add the default plugin and generate the code
to import the plugins automatically.

User can opt out from the automation by removing relevant
items from CONFIG variable: link_qpa_plugin or import_plugins.

Task-number: QTBUG-28131
Change-Id: Ic171c363464c099143374d3e39bcc28f6edf73d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-11 16:08:10 +01:00
Stephen Kelly
1278b3cb8a Remove QT_DLL and QT_NODLL defines.
Task-number: QTBUG-28044

Change-Id: Ib8c4e1e8e52703aa6590875c34f05b6bc71db808
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-11 13:37:57 +01:00
Oswald Buddenhagen
b8d0bde59c install a sane top-level examples.pro file
generally, don't install anything from the top-level examples dirs
automatically. the global README and the aggregator examples.pro are
installed explicitly.

Change-Id: I5f6b8760f37d917b800fa85979896a471778cac0
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-11 13:37:57 +01:00