Merge pull request #89327 from pohy/fix/mac-vulkan-build
Fix MoltenVK detection
This commit is contained in:
commit
30d08f0e13
@ -242,10 +242,17 @@ def configure(env: "SConsEnvironment"):
|
|||||||
env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "IOSurface"])
|
env.Append(LINKFLAGS=["-framework", "Metal", "-framework", "IOSurface"])
|
||||||
if not env["use_volk"]:
|
if not env["use_volk"]:
|
||||||
env.Append(LINKFLAGS=["-lMoltenVK"])
|
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 != "":
|
if mvk_path != "":
|
||||||
env.Append(LINKFLAGS=["-L" + os.path.join(mvk_path, "macos-arm64_x86_64")])
|
env.Append(LINKFLAGS=["-L" + mvk_path])
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
"MoltenVK SDK installation directory not found, use 'vulkan_sdk_path' SCons parameter to specify SDK path."
|
"MoltenVK SDK installation directory not found, use 'vulkan_sdk_path' SCons parameter to specify SDK path."
|
||||||
|
Loading…
Reference in New Issue
Block a user