diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-09 22:20:09 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-09 22:20:09 +0100 |
commit | 30d08f0e137e3c6669464f796e45f28542afcb0d (patch) | |
tree | 8c058d173a13ee3c3b7af60afed06ee42bc14861 /platform/macos/detect.py | |
parent | 8cc3216c756358ae7ff59bde39fafdbfc58f379c (diff) | |
parent | f65f480617872a5d13f40cb4183455f2f5033778 (diff) | |
download | redot-engine-30d08f0e137e3c6669464f796e45f28542afcb0d.tar.gz |
Merge pull request #89327 from pohy/fix/mac-vulkan-build
Fix MoltenVK detection
Diffstat (limited to 'platform/macos/detect.py')
-rw-r--r-- | platform/macos/detect.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/macos/detect.py b/platform/macos/detect.py index ed9e59ae05..3c8b1ebee1 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." |