WwiseSoundEngine.Build.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. #if UE_5_0_OR_LATER
  18. using EpicGames.Core;
  19. #else
  20. using Tools.DotNETCommon;
  21. #endif
  22. public class WwiseSoundEngine : ModuleRules
  23. {
  24. public WwiseSoundEngine(ReadOnlyTargetRules Target) : base(Target)
  25. {
  26. WwiseSoundEngine_2022_1.Apply(this, Target);
  27. WwiseSoundEngine_Null.Apply(this, Target);
  28. PrivateDependencyModuleNames.AddRange(
  29. new string[]
  30. {
  31. "Core",
  32. "CoreUObject",
  33. "Engine"
  34. }
  35. );
  36. ExternalDependencies.Add("WwiseSoundEngineVersion.Build.cs");
  37. ExternalDependencies.Add("WwiseUEPlatform.Build.cs");
  38. bAllowConfidentialPlatformDefines = true;
  39. }
  40. public void AddSoundEngineDirectory(string Module, bool TargetSupported)
  41. {
  42. if (TargetSupported)
  43. {
  44. #if UE_5_0_OR_LATER
  45. ConditionalAddModuleDirectory(
  46. EpicGames.Core.DirectoryReference.Combine(new EpicGames.Core.DirectoryReference(ModuleDirectory), "..",
  47. Module));
  48. #else
  49. ConditionalAddModuleDirectory(
  50. Tools.DotNETCommon.DirectoryReference.Combine(new Tools.DotNETCommon.DirectoryReference(ModuleDirectory), "..", Module));
  51. #endif
  52. }
  53. ExternalDependencies.Add(Path.Combine(ModuleDirectory, "..", Module, Module + "_OptionalModule.Build.cs"));
  54. PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "..", Module, "Public"));
  55. PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "..", Module, "Private"));
  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. Log.TraceInformation("Wwise SoundEngine is disabled: Using the null SoundEngine.");
  68. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_HEADER_PATH=\"Wwise/WwiseSoundEngine_Null.h\"");
  69. PrivateDefinitions.Add("WWISE_SOUNDENGINE_VERSION_CLASS=FWwiseSoundEngine_Null");
  70. PublicDefinitions.Add("AK_USE_NULL_SOUNDENGINE=1");
  71. }
  72. }
  73. }