From 5a1d075dc186c8109353e457243f504219594cd6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 14 Apr 2014 19:26:32 +0200 Subject: [PATCH] Add better iOS SDK detection --- libretro-build-ios.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index 0243d0ec..3b05f0c7 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -14,11 +14,23 @@ MAKE=make CXX11="clang++ -std=c++11 -stdlib=libc++ -miphoneos-version-min=5.0" IOS=1 -IOSVER=71 +IOSSDKLOC="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/" -ifeq ($(IOSVER),71) -export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -el +if [ -d "${IOSSDKLOC}iPhoneOS6.0.sdk" ]; then + echo "iOS 6.0 SDK detected" + IOSVER=60 + IOSSDKLOC="${IOSSDKLOC}iPhoneOS6.0.sdk" +fi +if [ -d "${IOSSDKLOC}iPhoneOS7.0.sdk" ]; then + echo "iOS 7.0 SDK detected" + IOSVER=70 + IOSSDKLOC="${IOSSDKLOC}iPhoneOS7.0.sdk" +fi +if [ -d "${IOSSDKLOC}iPhoneOS7.1.sdk" ]; then + echo "iOS 7.1 SDK detected" + IOSVER=71 + IOSSDKLOC="${IOSSDKLOC}iPhoneOS7.1.sdk" +fi . ./libretro-build-common.sh