diff options
Diffstat (limited to 'platform/ios/detect.py')
-rw-r--r-- | platform/ios/detect.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 53b367a0a7..ecd1f3d32d 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -51,6 +51,7 @@ def get_flags(): "arch": "arm64", "target": "template_debug", "use_volk": False, + "metal": True, "supported": ["mono"], "builtin_pcre2_with_jit": False, } @@ -154,8 +155,22 @@ def configure(env: "SConsEnvironment"): env.Prepend(CPPPATH=["#platform/ios"]) env.Append(CPPDEFINES=["IOS_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED"]) + if env["metal"] and env["arch"] != "arm64": + # Only supported on arm64, so skip it for x86_64 builds. + env["metal"] = False + + if env["metal"]: + env.AppendUnique(CPPDEFINES=["METAL_ENABLED", "RD_ENABLED"]) + env.Prepend( + CPPPATH=[ + "$IOS_SDK_PATH/System/Library/Frameworks/Metal.framework/Headers", + "$IOS_SDK_PATH/System/Library/Frameworks/QuartzCore.framework/Headers", + ] + ) + env.Prepend(CPPPATH=["#thirdparty/spirv-cross"]) + if env["vulkan"]: - env.Append(CPPDEFINES=["VULKAN_ENABLED", "RD_ENABLED"]) + env.AppendUnique(CPPDEFINES=["VULKAN_ENABLED", "RD_ENABLED"]) if env["opengl3"]: env.Append(CPPDEFINES=["GLES3_ENABLED", "GLES_SILENCE_DEPRECATION"]) |