summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-07-07 18:30:53 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-07-07 18:30:53 (GMT)
commit34ecfccfcdabf268c63c8dc2c36b792d5bea16c8 (patch)
treeb82866e6f40f5ae2d6d7a8b5f30c88cdd5cfad76 /BuildTools
parent7a1d879ca67e2890e3134f20ebf0041c54e66cb9 (diff)
downloadswift-contrib-34ecfccfcdabf268c63c8dc2c36b792d5bea16c8.zip
swift-contrib-34ecfccfcdabf268c63c8dc2c36b792d5bea16c8.tar.bz2
Specify iOS version to target
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConstruct4
1 files changed, 3 insertions, 1 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index f21cd08..8cdd81a 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -16,6 +16,7 @@ vars.Add(BoolVariable("warnings", "Compile with warnings turned on",
"yes" if os.name != "nt" else "no"))
vars.Add(BoolVariable("max_jobs", "Build with maximum number of parallel jobs", "no"))
vars.Add(EnumVariable("target", "Choose a target platform for compilation", "native", ["native", "iphone-simulator", "iphone-device"]))
+vars.Add("iosversion", "Choose an iOS version to target")
if os.name != "nt" :
vars.Add(BoolVariable("coverage", "Compile with coverage information", "no"))
if os.name == "posix" :
@@ -148,6 +149,7 @@ if ARGUMENTS.get("SWIFT_INSTALLDIR", "") :
# cross-compiling
target = env["target"]
+iOSVersion = env.get("iosversion", "4.0")
if target in ("iphone-device", "iphone-simulator"):
if target == "iphone-device":
sdkPart = "iPhoneOS"
@@ -164,7 +166,7 @@ if target in ("iphone-device", "iphone-simulator"):
env.Append(LINKFLAGS = ["-arch", "i386"])
targetIncludesArch = "i686"
- sdkVer = "3.0"
+ sdkVer = iOSVersion
sdk = "/Developer/Platforms/" + sdkPart + ".platform/Developer/SDKs/" + sdkPart + sdkVer + ".sdk"
env["FRAMEWORKS"] = ["CoreFoundation", "Foundation", "UIKit", "CoreGraphics"]