73 lines
2.1 KiB
C#
73 lines
2.1 KiB
C#
// Copyright (C) 2024 Jordon Brooks
|
|
|
|
using UnrealBuildTool;
|
|
using System.IO;
|
|
|
|
public class HarmonyLink : ModuleRules
|
|
{
|
|
public HarmonyLink(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
|
|
|
IWYUSupport = IWYUSupport.Full;
|
|
|
|
PublicIncludePaths.AddRange(
|
|
new string[] {
|
|
// ... add public include paths required here ...
|
|
}
|
|
);
|
|
|
|
|
|
PrivateIncludePaths.AddRange(
|
|
new string[] {
|
|
// ... add other private include paths required here ...
|
|
"ThirdParty/HarmonyLinkLib/include"
|
|
}
|
|
);
|
|
|
|
|
|
PublicDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
"Core",
|
|
"CoreUObject",
|
|
"Engine",
|
|
// ... add other public dependencies that you statically link with here ...
|
|
}
|
|
);
|
|
|
|
|
|
PrivateDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
// ... add private dependencies that you statically link with here ...
|
|
}
|
|
);
|
|
|
|
|
|
DynamicallyLoadedModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
// ... add any modules that your module loads dynamically here ...
|
|
}
|
|
);
|
|
|
|
// Platform-specific settings for static libraries
|
|
if (Target.Platform == UnrealTargetPlatform.Win64)
|
|
{
|
|
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/lib/Win64/HarmonyLinkLibStatic.lib"));
|
|
PublicDefinitions.Add("HARMONYLINKLIB_STATIC=1");
|
|
}
|
|
else if (Target.Platform == UnrealTargetPlatform.Linux)
|
|
{
|
|
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/lib/Linux/libHarmonyLinkLibStatic.a"));
|
|
PublicDefinitions.Add("HARMONYLINKLIB_STATIC=1");
|
|
}
|
|
// I shall include this if anyone wishes to provide Mac binaries of HarmonyLink but these are not included by default as I don't own one.
|
|
else if (Target.Platform == UnrealTargetPlatform.Mac)
|
|
{
|
|
PublicAdditionalLibraries.Add(Path.Combine(PluginDirectory, "Source/ThirdParty/HarmonyLinkLib/lib/Mac/libHarmonyLinkLibStatic.a"));
|
|
PublicDefinitions.Add("HARMONYLINKLIB_STATIC=1");
|
|
}
|
|
}
|
|
}
|