From e096e2fa8ad4d9d71af6821f67be0c8e2819c044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:57:13 +0300 Subject: [PATCH] Fix macOS build with ANGLE enabled and Vulkan disabled. --- platform/macos/detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/macos/detect.py b/platform/macos/detect.py index a635e6b16b..6d8f43e14f 100644 --- a/platform/macos/detect.py +++ b/platform/macos/detect.py @@ -235,6 +235,8 @@ def configure(env: "SConsEnvironment"): ) env.Append(LIBS=["pthread", "z"]) + extra_frameworks = set() + if env["opengl3"]: env.Append(CPPDEFINES=["GLES3_ENABLED"]) if env["angle_libs"] != "": @@ -243,6 +245,7 @@ def configure(env: "SConsEnvironment"): env.Append(LINKFLAGS=["-lANGLE.macos." + env["arch"]]) env.Append(LINKFLAGS=["-lEGL.macos." + env["arch"]]) env.Append(LINKFLAGS=["-lGLES.macos." + env["arch"]]) + extra_frameworks.add("IOSurface") env.Prepend(CPPEXTPATH=["#thirdparty/angle/include"]) env.Append(LINKFLAGS=["-rpath", "@executable_path/../Frameworks", "-rpath", "@executable_path"]) @@ -251,8 +254,6 @@ def configure(env: "SConsEnvironment"): print_warning("Target architecture '{}' does not support the Metal rendering driver".format(env["arch"])) env["metal"] = False - extra_frameworks = set() - if env["metal"]: env.AppendUnique(CPPDEFINES=["METAL_ENABLED", "RD_ENABLED"]) extra_frameworks.add("Metal")