diff options
Diffstat (limited to 'mkspecs/common/xcode.conf')
-rw-r--r-- | mkspecs/common/xcode.conf | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/common/xcode.conf b/mkspecs/common/xcode.conf index 0095469421..b15266b678 100644 --- a/mkspecs/common/xcode.conf +++ b/mkspecs/common/xcode.conf @@ -3,7 +3,7 @@ # # Get path of Xcode's Developer directory -QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path") +QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") @@ -11,6 +11,10 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") +# Make sure Xcode is set up properly +isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \ + error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.") + # Extract Xcode version using xcodebuild xcode_version = $$system("/usr/bin/xcodebuild -version") QMAKE_XCODE_VERSION = $$member(xcode_version, 1) |