Commit Graph

605 Commits

Author SHA1 Message Date
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