From f65f480617872a5d13f40cb4183455f2f5033778 Mon Sep 17 00:00:00 2001 From: pohy <0ronon0@gmail.com> Date: Sat, 9 Mar 2024 20:21:17 +0100 Subject: [PATCH] Fix MoltenVK detection --- platform/macos/detect.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/platform/macos/detect.py b/platform/macos/detect.py index ed9e59ae053..3c8b1ebee15 100644 --- a/platform/macos/detect.py +++ b/platform/macos/detect.py @@ -242,10 +242,17 @@ def configure(env: "SConsEnvironment"): env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "IOSurface"]) if not env["use_volk"]: env.Append(LINKFLAGS=["-lMoltenVK"]) - mvk_path = detect_mvk(env, "macos-arm64_x86_64") + + mvk_path = "" + arch_variants = ["macos-arm64_x86_64", "macos-" + env["arch"]] + for arch in arch_variants: + mvk_path = detect_mvk(env, arch) + if mvk_path != "": + mvk_path = os.path.join(mvk_path, arch) + break if mvk_path != "": - env.Append(LINKFLAGS=["-L" + os.path.join(mvk_path, "macos-arm64_x86_64")]) + env.Append(LINKFLAGS=["-L" + mvk_path]) else: print( "MoltenVK SDK installation directory not found, use 'vulkan_sdk_path' SCons parameter to specify SDK path."