| 11 | { |
| 12 | /// <inheritdoc /> |
| 13 | public override void Setup(BuildOptions options) |
| 14 | { |
| 15 | base.Setup(options); |
| 16 | |
| 17 | // Don't ref Core module but only Profiler |
| 18 | options.PrivateDependencies.Clear(); |
| 19 | if (Profiler.Use(options)) |
| 20 | options.PublicDependencies.Add("Profiler"); |
| 21 | |
| 22 | // Use source folder per platform group |
| 23 | options.SourcePaths.Clear(); |
| 24 | options.SourcePaths.Add(Path.Combine(FolderPath, "Base")); |
| 25 | options.SourceFiles.AddRange(Directory.GetFiles(FolderPath, "*.*", SearchOption.TopDirectoryOnly)); |
| 26 | switch (options.Platform.Target) |
| 27 | { |
| 28 | case TargetPlatform.Windows: |
| 29 | options.SourcePaths.Add(Path.Combine(FolderPath, "Win32")); |
| 30 | options.SourcePaths.Add(Path.Combine(FolderPath, "Windows")); |
| 31 | |
| 32 | options.OutputFiles.Add("dinput8.lib"); |
| 33 | options.OutputFiles.Add("xinput9_1_0.lib"); |
| 34 | |
| 35 | if (options.Configuration != TargetConfiguration.Release) |
| 36 | { |
| 37 | options.OutputFiles.Add("dbghelp.lib"); |
| 38 | options.DelayLoadLibraries.Add("dbghelp.dll"); |
| 39 | options.DependencyFiles.Add(Path.Combine(options.DepsFolder, "dbghelp.dll")); |
| 40 | } |
| 41 | if (options.Target.IsEditor) |
| 42 | { |
| 43 | //options.Libraries.Add("Gdi32.dll"); |
| 44 | options.Libraries.Add("Dwmapi.dll"); |
| 45 | } |
| 46 | break; |
| 47 | case TargetPlatform.UWP: |
| 48 | options.SourcePaths.Add(Path.Combine(FolderPath, "Win32")); |
| 49 | options.SourcePaths.Add(Path.Combine(FolderPath, "UWP")); |
| 50 | break; |
| 51 | case TargetPlatform.Linux: |
| 52 | options.SourcePaths.Add(Path.Combine(FolderPath, "Unix")); |
| 53 | options.SourcePaths.Add(Path.Combine(FolderPath, "Linux")); |
| 54 | break; |
| 55 | case TargetPlatform.PS4: |
| 56 | options.SourcePaths.Add(Path.Combine(FolderPath, "Unix")); |
| 57 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform")); |
| 58 | break; |
| 59 | case TargetPlatform.PS5: |
| 60 | options.SourcePaths.Add(Path.Combine(FolderPath, "Unix")); |
| 61 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS5", "Engine", "Platform")); |
| 62 | break; |
| 63 | case TargetPlatform.XboxOne: |
| 64 | options.SourcePaths.Add(Path.Combine(FolderPath, "Win32")); |
| 65 | options.SourcePaths.Add(Path.Combine(FolderPath, "GDK")); |
| 66 | options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform")); |
| 67 | break; |
| 68 | case TargetPlatform.XboxScarlett: |
| 69 | options.SourcePaths.Add(Path.Combine(FolderPath, "Win32")); |
| 70 | options.SourcePaths.Add(Path.Combine(FolderPath, "GDK")); |