Skip to content

Commit

Permalink
Always compile AirLib
Browse files Browse the repository at this point in the history
  • Loading branch information
joelreymont committed Feb 13, 2024
1 parent f9acbd8 commit 6bbd11b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Unreal/Plugins/AirSim/Source/AirSim.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ private string AirSimPluginPath
}
private string ProjectBinariesPath
{
get { return Path.Combine(
get
{
return Path.Combine(
Directory.GetParent(AirSimPluginPath).Parent.FullName, "Binaries");
}
}
Expand Down Expand Up @@ -90,7 +92,7 @@ public AirSim(ReadOnlyTargetRules Target) : base(Target)
PublicIncludePaths.Add(Path.Combine(AirLibPath, "deps", "eigen3"));
AddOSLibDependencies(Target);

SetupCompileMode(CompileMode.HeaderOnlyWithRpc, Target);
SetupCompileMode(CompileMode.CppCompileWithRpc, Target);
}

private void AddOSLibDependencies(ReadOnlyTargetRules Target)
Expand All @@ -105,12 +107,12 @@ private void AddOSLibDependencies(ReadOnlyTargetRules Target)
PublicAdditionalLibraries.Add("dxguid.lib");
}

if (Target.Platform == UnrealTargetPlatform.Linux)
{
// needed when packaging
PublicAdditionalLibraries.Add("stdc++");
PublicAdditionalLibraries.Add("supc++");
}
if (Target.Platform == UnrealTargetPlatform.Linux)
{
// needed when packaging
PublicAdditionalLibraries.Add("stdc++");
PublicAdditionalLibraries.Add("supc++");
}
}

static void CopyFileIfNewer(string srcFilePath, string destFolder)
Expand Down Expand Up @@ -142,7 +144,9 @@ private bool AddLibDependency(string LibName, string LibPath, string LibFileName
isLibrarySupported = true;

PublicAdditionalLibraries.Add(Path.Combine(LibPath, PlatformString, ConfigurationString, LibFileName + ".lib"));
} else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Mac) {
}
else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Mac)
{
isLibrarySupported = true;
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "lib" + LibFileName + ".a"));
}
Expand Down

0 comments on commit 6bbd11b

Please sign in to comment.