summaryrefslogtreecommitdiff
path: root/platform/iphone/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone/detect.py')
-rw-r--r--platform/iphone/detect.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index f646b8b1d5..e01950c1db 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -23,6 +23,7 @@ def get_opts():
return [
('IPHONEPATH', 'Path to iPhone toolchain', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain'),
('IPHONESDK', 'Path to the iPhone SDK', ''),
+ BoolVariable('use_static_mvk', 'Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables validation layers)', False),
BoolVariable('game_center', 'Support for game center', True),
BoolVariable('store_kit', 'Support for in-app store', True),
BoolVariable('icloud', 'Support for iCloud', True),
@@ -149,7 +150,7 @@ def configure(env):
'-framework', 'Foundation',
'-framework', 'GameController',
'-framework', 'MediaPlayer',
- '-framework', 'OpenGLES',
+ '-framework', 'Metal',
'-framework', 'QuartzCore',
'-framework', 'Security',
'-framework', 'SystemConfiguration',
@@ -170,11 +171,18 @@ def configure(env):
env.Append(CPPDEFINES=['ICLOUD_ENABLED'])
env.Prepend(CPPPATH=['$IPHONESDK/usr/include',
- '$IPHONESDK/System/Library/Frameworks/OpenGLES.framework/Headers',
'$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers',
])
env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate'
env.Prepend(CPPPATH=['#platform/iphone'])
- env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'GLES_ENABLED', 'COREAUDIO_ENABLED'])
+ env.Append(CPPDEFINES=['IPHONE_ENABLED', 'UNIX_ENABLED', 'COREAUDIO_ENABLED'])
+
+ env.Append(CPPDEFINES=['VULKAN_ENABLED'])
+ env.Append(LINKFLAGS=['-framework', 'IOSurface'])
+ if (env['use_static_mvk']):
+ env.Append(LINKFLAGS=['-framework', 'MoltenVK'])
+ env['builtin_vulkan'] = False
+ elif not env['builtin_vulkan']:
+ env.Append(LIBS=['vulkan'])