Add iOS platform (refactor Mac into shared Apple platform impl)

This commit is contained in:
Wojtek Figat
2023-03-15 20:57:44 +01:00
parent dc29ee180e
commit 0ba261d338
84 changed files with 2806 additions and 1623 deletions

View File

@@ -5002,7 +5002,7 @@ extern "C" {
tv->tv_nsec = t.QuadPart % 1000000 * 1000;
return (0);
}
#elif __APPLE__ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#elif __APPLE__ && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define CLOCK_MONOTONIC 0
int clock_gettime(int X, struct timespec *ts) {

View File

@@ -42,6 +42,7 @@ public class freetype : DepsModule
case TargetPlatform.Android:
case TargetPlatform.Switch:
case TargetPlatform.Mac:
case TargetPlatform.iOS:
options.OutputFiles.Add(Path.Combine(depsRoot, "libfreetype.a"));
break;
default: throw new InvalidPlatformException(options.Platform.Target);

View File

@@ -42,6 +42,7 @@ public class ogg : DepsModule
case TargetPlatform.Android:
case TargetPlatform.Switch:
case TargetPlatform.Mac:
case TargetPlatform.iOS:
options.OutputFiles.Add(Path.Combine(depsRoot, "libogg.a"));
break;
default: throw new InvalidPlatformException(options.Platform.Target);

View File

@@ -44,6 +44,11 @@ public class volk : ThirdPartyModule
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);
}

View File

@@ -42,6 +42,7 @@ public class vorbis : DepsModule
case TargetPlatform.Android:
case TargetPlatform.Switch:
case TargetPlatform.Mac:
case TargetPlatform.iOS:
options.OutputFiles.Add(Path.Combine(depsRoot, "libvorbis.a"));
options.OutputFiles.Add(Path.Combine(depsRoot, "libvorbisenc.a"));
options.OutputFiles.Add(Path.Combine(depsRoot, "libvorbisfile.a"));