Determine the correct SDK and DEVROOT programmatically.

This commit is contained in:
Joseph Hager 2012-04-17 15:49:42 -04:00
parent f4ff8677a0
commit 18687fb762
4 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
. $(dirname $0)/environment.sh
pushd $KIVYIOSROOT/src/SDL/Xcode-iPhoneOS/SDL
xcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration Release -sdk iphoneos5.0
xcodebuild -project SDLiPhoneOS.xcodeproj -target libSDL -configuration Release -sdk iphoneos$SDKVER
popd
cp src/SDL/Xcode-iPhoneOS/SDL/build/Release-iPhoneOS/libSDL.a $BUILDROOT/lib

View file

@ -27,6 +27,7 @@ try cp -a $TEMPLATESDIR/template.xcodeproj $APPDIR/$APPID.xcodeproj
echo "-> Customize templates"
try find $APPDIR -type f -exec sed -i '' "s/##APPID##/$APPID/g" {} \;
try find $APPDIR -type f -exec sed -i '' "s/##APPNAME##/$APPNAME/g" {} \;
try find $APPDIR -type f -exec sed -i '' "s/##SDKVER##/$SDKVER/g" {} \;
echo "-> Done !"

View file

@ -7,8 +7,8 @@ try () {
}
# iOS SDK Environmnent
export SDKVER=5.0
export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
export SDKVER=`xcodebuild -showsdks | fgrep "iphoneos" | tail -n 1 | awk '{print $2}'`
export DEVROOT=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer
export SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
# version of packages

View file

@ -256,7 +256,7 @@
"\"$(PROJECT_DIR)/../build/python/include\"",
);
INFOPLIST_FILE = "##APPID##-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = ##SDKVER##;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(PROJECT_DIR)/../build/lib\"",
@ -286,7 +286,7 @@
"\"$(PROJECT_DIR)/../build/python/include\"",
);
INFOPLIST_FILE = "##APPID##-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = ##SDKVER##;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(PROJECT_DIR)/../build/lib\"",
@ -314,7 +314,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = ##SDKVER##;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
@ -339,7 +339,7 @@
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = ##SDKVER##;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PROVISIONING_PROFILE = "";