Fix building macOS/iOS with the latest Vulkan SDK

This commit is contained in:
Wojtek Figat
2024-03-24 19:39:16 +01:00
parent 6709fcd95d
commit 51504d0d92
3 changed files with 67 additions and 5 deletions

View File

@@ -42,16 +42,13 @@ public class volk : ThirdPartyModule
break;
case TargetPlatform.Mac:
options.PublicDefinitions.Add("VK_USE_PLATFORM_MACOS_MVK");
options.DependencyFiles.Add(Path.Combine(VulkanSdk.Instance.RootPath, "../MoltenVK/dylib/macOS/libMoltenVK.dylib"));
options.DependencyFiles.Add(Path.Combine(VulkanSdk.Instance.RootPath, "../MoltenVK/dylib/macOS/MoltenVK_icd.json"));
break;
case TargetPlatform.iOS:
options.PublicDefinitions.Add("VK_USE_PLATFORM_IOS_MVK");
options.DependencyFiles.Add(Path.Combine(VulkanSdk.Instance.RootPath, "../MoltenVK/dylib/iOS/libMoltenVK.dylib"));
options.DependencyFiles.Add(Path.Combine(VulkanSdk.Instance.RootPath, "../MoltenVK/dylib/iOS/MoltenVK_icd.json"));
break;
default: throw new InvalidPlatformException(options.Platform.Target);
}
VulkanSdk.Instance.AddDependencyFiles(options);
string includesFolderPath;
if (VulkanSdk.Instance.TryGetIncludePath(options.Platform.Target, out includesFolderPath))