add support for android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a

This commit is contained in:
Mamadou Babaei
2023-02-07 10:42:30 +01:00
parent a78c013878
commit e16c2d8759
27 changed files with 151 additions and 9 deletions
@@ -86,18 +86,41 @@ public class SenseGloveConnectImpl : ModuleRules
#if ! UE_5_2_OR_LATER
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
List<string> Architectures = ToolChain.GetAllArchitectures();
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
foreach (string Arch in Architectures)
{
if (Arch != "-arm64")
if (Arch == "-arm64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
break;
}
else if (Arch == "-armv7")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7"));
break;
}
else if (Arch == "-x64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
break;
}
else if (Arch == "-86")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86"));
break;
}
else
{
Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!");
break;
}
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#else
Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!");
Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!");
#endif
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
@@ -187,18 +210,41 @@ public class SenseGloveConnectImpl : ModuleRules
#if ! UE_5_2_OR_LATER
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
List<string> Architectures = ToolChain.GetAllArchitectures();
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
foreach (string Arch in Architectures)
{
if (Arch != "-arm64")
if (Arch == "-arm64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
break;
}
else if (Arch == "-armv7")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7"));
break;
}
else if (Arch == "-x64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
break;
}
else if (Arch == "-86")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86"));
break;
}
else
{
Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!");
break;
}
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#else
Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!");
Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!");
#endif
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
@@ -85,18 +85,41 @@ public class SenseGloveCoreImpl : ModuleRules
#if ! UE_5_2_OR_LATER
IAndroidToolChain ToolChain = AndroidExports.CreateToolChain(Target.ProjectFile);
List<string> Architectures = ToolChain.GetAllArchitectures();
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
foreach (string Arch in Architectures)
{
if (Arch != "-arm64")
if (Arch == "-arm64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
break;
}
else if (Arch == "-armv7")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "armv7"));
break;
}
else if (Arch == "-x64")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
break;
}
else if (Arch == "-86")
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86"));
break;
}
else
{
Debug.Assert(false, "Only AArch64/ARM64 variant of Android is supported!");
break;
}
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "oculus"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#else
Debug.Assert(false, "Developing for Android on UE 5.2 is not yet supported!");
Debug.Assert(false, "Developing for Android on UE 5.2+ is not yet supported!");
#endif
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.