fix android architecture detection issues on ue 5.2
This commit is contained in:
@@ -83,11 +83,8 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
#if ! UE_5_2_OR_LATER
|
||||
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
|
||||
List<string> Architectures = ToolChain.GetAllArchitectures();
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||
|
||||
#if UE_5_1_OR_LATER
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||
#elif UE_4_27_OR_LATER
|
||||
@@ -96,6 +93,23 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
Debug.Assert(false, "Developing for Android on UE versions older than 4.27 is not supported!");
|
||||
#endif
|
||||
|
||||
#if UE_5_2_OR_LATER
|
||||
if (Target.Architecture == UnrealArch.Arm64)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
||||
}
|
||||
else if (Target.Architecture == UnrealArch.X64)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Unsupported Android architecture!");
|
||||
}
|
||||
#else
|
||||
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
|
||||
List<string> Architectures = ToolChain.GetAllArchitectures();
|
||||
|
||||
foreach (string Arch in Architectures)
|
||||
{
|
||||
if (Arch == "-arm64")
|
||||
@@ -120,15 +134,13 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!");
|
||||
Debug.Assert(false, "Unsupported Android architecture!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||
#else
|
||||
Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!");
|
||||
#endif
|
||||
}
|
||||
else if (Target.Platform == UnrealTargetPlatform.Linux)
|
||||
{
|
||||
@@ -202,11 +214,8 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
#if ! UE_5_2_OR_LATER
|
||||
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
|
||||
List<string> Architectures = ToolChain.GetAllArchitectures();
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||
|
||||
#if UE_5_1_OR_LATER
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||
#elif UE_4_27_OR_LATER
|
||||
@@ -215,6 +224,23 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
Debug.Assert(false, "Developing for Android on UE versions older than 4.27 is not supported!");
|
||||
#endif
|
||||
|
||||
#if UE_5_2_OR_LATER
|
||||
if (Target.Architecture == UnrealArch.Arm64)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
||||
}
|
||||
else if (Target.Architecture == UnrealArch.X64)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Unsupported Android architecture!");
|
||||
}
|
||||
#else
|
||||
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
|
||||
List<string> Architectures = ToolChain.GetAllArchitectures();
|
||||
|
||||
foreach (string Arch in Architectures)
|
||||
{
|
||||
if (Arch == "-arm64")
|
||||
@@ -239,15 +265,13 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!");
|
||||
Debug.Assert(false, "Unsupported Android architecture!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||
#else
|
||||
Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!");
|
||||
#endif
|
||||
}
|
||||
else if (Target.Platform == UnrealTargetPlatform.Linux)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user