| 12 | { |
| 13 | /// <inheritdoc /> |
| 14 | public override void Setup(BuildOptions options) |
| 15 | { |
| 16 | base.Setup(options); |
| 17 | |
| 18 | options.SourcePaths.Clear(); |
| 19 | options.SourceFiles.AddRange(Directory.GetFiles(FolderPath, "*.*", SearchOption.TopDirectoryOnly)); |
| 20 | |
| 21 | switch (options.Platform.Target) |
| 22 | { |
| 23 | case TargetPlatform.Windows: |
| 24 | case TargetPlatform.UWP: |
| 25 | // Media Foundation |
| 26 | options.SourcePaths.Add(Path.Combine(FolderPath, "MF")); |
| 27 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_MF"); |
| 28 | options.OutputFiles.Add("mf.lib"); |
| 29 | options.OutputFiles.Add("mfcore.lib"); |
| 30 | options.OutputFiles.Add("mfplat.lib"); |
| 31 | options.OutputFiles.Add("mfplay.lib"); |
| 32 | options.OutputFiles.Add("mfreadwrite.lib"); |
| 33 | options.OutputFiles.Add("mfuuid.lib"); |
| 34 | break; |
| 35 | case TargetPlatform.Linux: |
| 36 | // Not implemented |
| 37 | break; |
| 38 | case TargetPlatform.XboxOne: |
| 39 | case TargetPlatform.XboxScarlett: |
| 40 | // Media Foundation |
| 41 | options.SourcePaths.Add(Path.Combine(FolderPath, "MF")); |
| 42 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_MF"); |
| 43 | options.OutputFiles.Add("mfplat.lib"); |
| 44 | options.OutputFiles.Add("mfreadwrite.lib"); |
| 45 | options.OutputFiles.Add("mfuuid.lib"); |
| 46 | break; |
| 47 | case TargetPlatform.Mac: |
| 48 | case TargetPlatform.iOS: |
| 49 | // AVFoundation |
| 50 | options.SourcePaths.Add(Path.Combine(FolderPath, "AV")); |
| 51 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_AV"); |
| 52 | break; |
| 53 | case TargetPlatform.PS4: |
| 54 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Video")); |
| 55 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_PS4"); |
| 56 | break; |
| 57 | case TargetPlatform.PS5: |
| 58 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS5", "Engine", "Video")); |
| 59 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_PS5"); |
| 60 | break; |
| 61 | case TargetPlatform.Switch: |
| 62 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "Switch", "Engine", "Video")); |
| 63 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_SWITCH"); |
| 64 | break; |
| 65 | case TargetPlatform.Android: |
| 66 | options.SourcePaths.Add(Path.Combine(FolderPath, "Android")); |
| 67 | options.CompileEnv.PreprocessorDefinitions.Add("VIDEO_API_ANDROID"); |
| 68 | break; |
| 69 | case TargetPlatform.Web: |
| 70 | // Not implemented |
| 71 | break; |