Commit Graph

12 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00