WwiseSoundEngine.Build.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. using System.IO;
  16. using UnrealBuildTool;
  17. public class WwiseSoundEngine : ModuleRules
  18. {
  19. public WwiseSoundEngine(ReadOnlyTargetRules Target) : base(Target)
  20. {
  21. PublicDependencyModuleNames.AddRange(new string[] { "WwiseUtils" });
  22. WwiseSoundEngine_2022_1.Apply(this, Target);
  23. WwiseSoundEngine_2023_1.Apply(this, Target, true); // Latest version should be written with "latest" to true for logging purposes
  24. WwiseSoundEngine_Null.Apply(this, Target);
  25. PrivateDependencyModuleNames.AddRange(
  26. new string[]
  27. {
  28. "Core",
  29. "WwiseUtils"
  30. }
  31. );
  32. ExternalDependencies.Add("WwiseSoundEngineVersion.Build.cs");
  33. ExternalDependencies.Add("WwiseUEPlatform.Build.cs");
  34. bAllowConfidentialPlatformDefines = true;
  35. }
  36. public void AddSoundEngineDirectory(string Module, bool TargetSupported)
  37. {
  38. if (TargetSupported)
  39. {
  40. #if UE_5_0_OR_LATER
  41. ConditionalAddModuleDirectory(
  42. EpicGames.Core.DirectoryReference.Combine(new EpicGames.Core.DirectoryReference(ModuleDirectory), "..",
  43. Module));
  44. #else
  45. ConditionalAddModuleDirectory(
  46. Tools.DotNETCommon.DirectoryReference.Combine(new Tools.DotNETCommon.DirectoryReference(ModuleDirectory), "..", Module));
  47. #endif
  48. }
  49. ExternalDependencies.Add(Path.Combine(ModuleDirectory, "..", Module, Module + "_OptionalModule.Build.cs"));
  50. PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "..", Module, "Public"));
  51. PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "..", Module, "Private"));
  52. #if UE_5_3_OR_LATER
  53. bLegacyParentIncludePaths = false;
  54. CppStandard = CppStandardVersion.Default;
  55. #endif
  56. }
  57. public void AddVersionHeaders(string Module, bool TargetSupported)
  58. {
  59. if (TargetSupported)
  60. {
  61. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_HEADER_PATH=\"Wwise/" + Module + ".h\"");
  62. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_CLASS=F" + Module);
  63. PublicDefinitions.Add("AK_USE_NULL_SOUNDENGINE=0");
  64. }
  65. else
  66. {
  67. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_HEADER_PATH=\"Wwise/WwiseSoundEngine_Null.h\"");
  68. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_CLASS=FWwiseSoundEngine_Null");
  69. PublicDefinitions.Add("AK_USE_NULL_SOUNDENGINE=1");
  70. }
  71. }
  72. }