summaryrefslogtreecommitdiffstats
path: root/platform/iphone/detect.py
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2017-09-25 00:37:17 -0400
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2017-09-25 14:36:30 -0400
commit3e69d19116e8d0d64fcbb096d925249e5d3596ed (patch)
treedb29307c60393a6b47bd71717ff336743abfb0b5 /platform/iphone/detect.py
parent5be675eb0332ccf660a81df51701146997ef9fcb (diff)
downloadredot-engine-3e69d19116e8d0d64fcbb096d925249e5d3596ed.tar.gz
Use BoolVariable in platform-specific options.
Diffstat (limited to 'platform/iphone/detect.py')
-rw-r--r--platform/iphone/detect.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index d763b4b6c3..dd4db0b1cd 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -20,17 +20,17 @@ def can_build():
def get_opts():
-
+ from SCons.Variables import BoolVariable
return [
('IPHONEPLATFORM', 'Name of the iPhone platform', 'iPhoneOS'),
('IPHONEPATH', 'Path to iPhone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'),
('IPHONESDK', 'Path to the iPhone SDK', '/Applications/Xcode.app/Contents/Developer/Platforms/${IPHONEPLATFORM}.platform/Developer/SDKs/${IPHONEPLATFORM}.sdk/'),
- ('game_center', 'Support for game center', 'yes'),
- ('store_kit', 'Support for in-app store', 'yes'),
- ('icloud', 'Support for iCloud', 'yes'),
- ('ios_exceptions', 'Enable exceptions', 'no'),
+ BoolVariable('game_center', 'Support for game center', True),
+ BoolVariable('store_kit', 'Support for in-app store', True),
+ BoolVariable('icloud', 'Support for iCloud', True),
+ BoolVariable('ios_exceptions', 'Enable exceptions', False),
('ios_triple', 'Triple for ios toolchain', ''),
- ('ios_sim', 'Build simulator binary', 'no'),
+ BoolVariable('ios_sim', 'Build simulator binary', False),
]
@@ -58,7 +58,7 @@ def configure(env):
## Architecture
- if (env["ios_sim"] == "yes" or env["arch"] == "x86"): # i386, simulator
+ if env["ios_sim"] or env["arch"] == "x86": # i386, simulator
env["arch"] = "x86"
env["bits"] = "32"
elif (env["arch"] == "arm" or env["arch"] == "arm32" or env["arch"] == "armv7" or env["bits"] == "32"): # arm
@@ -91,7 +91,7 @@ def configure(env):
env.Append(CPPFLAGS=['-DNEED_LONG_INT'])
env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON'])
- if env['ios_exceptions'] == 'yes':
+ if env['ios_exceptions']:
env.Append(CPPFLAGS=['-fexceptions'])
else:
env.Append(CPPFLAGS=['-fno-exceptions'])
@@ -129,15 +129,15 @@ def configure(env):
])
# Feature options
- if env['game_center'] == 'yes':
+ if env['game_center']:
env.Append(CPPFLAGS=['-DGAME_CENTER_ENABLED'])
env.Append(LINKFLAGS=['-framework', 'GameKit'])
- if env['store_kit'] == 'yes':
+ if env['store_kit']:
env.Append(CPPFLAGS=['-DSTOREKIT_ENABLED'])
env.Append(LINKFLAGS=['-framework', 'StoreKit'])
- if env['icloud'] == 'yes':
+ if env['icloud']:
env.Append(CPPFLAGS=['-DICLOUD_ENABLED'])
env.Append(CPPPATH=['$IPHONESDK/usr/include',