Skip to content

Commit

Permalink
feat: fix ue5.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
DarcJC committed Mar 31, 2023
1 parent 3f7672a commit 9d7d4a1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
28 changes: 23 additions & 5 deletions Source/ThirdParty/CMake/CMakeTarget.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,31 +387,49 @@ private string GetWindowsGeneratorName(WindowsCompiler compiler)

return generatorName;
}


#if UE_5_2_OR_LATER
private string GetWindowsGeneratorOptions(WindowsCompiler compiler, UnrealArch architecture)
{
string generatorOptions = "";

if ((compiler == WindowsCompiler.VisualStudio2022) || (compiler == WindowsCompiler.VisualStudio2019)
)
{
if (architecture == UnrealArch.X64)
generatorOptions = "-A x64";
else if (architecture == UnrealArch.Arm64)
generatorOptions = "-A ARM64";
}

return generatorOptions;
}
#else
private string GetWindowsGeneratorOptions(WindowsCompiler compiler, WindowsArchitecture architecture)
{
string generatorOptions = "";

if ((compiler == WindowsCompiler.VisualStudio2022) || (compiler == WindowsCompiler.VisualStudio2019)
#if !UE_5_0_OR_LATER
|| (compiler == WindowsCompiler.VisualStudio2017)
#endif //!UE_5_0_OR_LATER
)
{
if (architecture == UnrealArch.X64)
if (architecture == WindowsArchitecture.x64)
generatorOptions = "-A x64";
else if (architecture == UnrealArch.Arm64)
else if (architecture == WindowsArchitecture.ARM64)
generatorOptions = "-A ARM64";
#if !UE_5_0_OR_LATER
else if(architecture == UnrealArch.x86)
else if(architecture == WindowsArchitecture.x86)
generatorOptions = "-A Win32";
else if(architecture == UnrealArch.Arm32)
else if(architecture == WindowsArchitecture.ARM32)
generatorOptions = "-A ARM";
#endif //!UE_5_0_OR_LATER
}

return generatorOptions;
}
#endif // UE_5_2_OR_LATER

GeneratorInfo GetGeneratorInfo(ReadOnlyTargetRules target, ModuleRules rules)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ TSharedPtr<FRawMesh> FWavefrontFileParser::Parse(EWavefrontParseError& OutError)
RawMesh->FaceMaterialIndices.SetNumZeroed(EdgeNum / 3);
RawMesh->FaceSmoothingMasks.SetNumZeroed(EdgeNum / 3);

return RawMesh.ToSharedPtr();
return RawMesh;
}

EWavefrontAttrType FWavefrontFileParser::GetLabelFromLine(const FString& InLine, FString& OutLineData)
Expand Down

0 comments on commit 9d7d4a1

Please sign in to comment.