summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-07 16:42:47 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-29 02:00:12 +0000
commitfa7626713b3a943609453459190e16c49d61dfd3 (patch)
treef481be51b12a1b23c269e9cbccad34e8c8a58f87 /configure
parent3c89c71da5f00ada18d9405abddb5812dc4278ea (diff)
Allow using Xcode Command Line Tools to build Qt
Some users don't want to download the full Xcode installation which can weigh upwards of 5 GB download and 20 GB installed. [ChangeLog][macOS / iOS] Qt can now be built using just the Xcode Command Line Tools, without needing to install the full Xcode IDE. Task-number: QTBUG-35928 Task-number: QTBUG-41908 Change-Id: I6d13c9a03ab9087b3ab56e8547f53f0cc2806c7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 14 insertions, 9 deletions
diff --git a/configure b/configure
index 73679de621..bf37224d24 100755
--- a/configure
+++ b/configure
@@ -234,7 +234,7 @@ macSDKify()
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
- sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
case "$sdk" in
@@ -322,18 +322,23 @@ fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
echo >&2
- echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
- echo " version. See the xcode-select man page for more information." >&2
+ echo " No Xcode selected. Please install Xcode via the App Store, " >&2
+ echo " or the command line developer tools via xcode-select --install, " >&2
+ echo " and use xcode-select --switch to choose the right installation. " >&2
+ echo " See the xcode-select man page for more information." >&2
echo >&2
exit 2
fi
- if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
- echo >&2
- echo " Xcode not set up properly. You may need to confirm the license" >&2
- echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
- echo >&2
- exit 2
+ # In the else case we are probably using a Command Line Tools installation
+ if /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
+ if ! /usr/bin/xcrun xcodebuild -license check 2>/dev/null; then
+ echo >&2
+ echo " Xcode setup not complete. You need to confirm the license" >&2
+ echo " agreement by running 'sudo xcrun xcodebuild -license accept'." >&2
+ echo >&2
+ exit 2
+ fi
fi
fi