Commit e31fb2a4 authored by Luca Barbato's avatar Luca Barbato Committed by Felix Paul Kühne

contrib/bootstrap: improve xcrun handling

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 7e8b856b
......@@ -171,7 +171,11 @@ check_ios_sdk()
check_macosx_sdk()
{
[ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.7" && OSX_VERSION=10.7
if [ -z "${OSX_VERSION}" ]
then
OSX_VERSION=`xcrun --show-sdk-version`
echo "OSX_VERSION not specified, assuming $OSX_VERSION"
fi
if test -z "$SDKROOT"
then
SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
......@@ -184,6 +188,12 @@ check_macosx_sdk()
SDKROOT=`xcode-select -print-path`/SDKs/MacOSX$OSX_VERSION.sdk
echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
fi
if [ ! -d "${SDKROOT}" ]
then
SDKROOT_NOT_FOUND="$SDKROOT"
SDKROOT=`xcrun --show-sdk-path`
echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
fi
if [ ! -d "${SDKROOT}" ]
then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment