fix: asking CppCompileEnvironment for a single Architecture, but it has multiple Architectures (arm64, x64)
This commit is contained in:
@@ -186,19 +186,7 @@ Please note that modules postfixed with **Impl** are intended for interal use an
|
||||
│ │ │
|
||||
│ │ └── release
|
||||
│ │
|
||||
│ ├── armv7 (32-bit ARM variant of Android)
|
||||
│ │ │
|
||||
│ │ ├── debug
|
||||
│ │ │
|
||||
│ │ └── release
|
||||
│ │
|
||||
│ ├── x64 (64-bit x86-64 variant of Android)
|
||||
│ │ │
|
||||
│ │ ├── debug
|
||||
│ │ │
|
||||
│ │ └── release
|
||||
│ │
|
||||
│ └── x86 (32-bit x86 variant of Android)
|
||||
│ └── x64 (64-bit x86-64 variant of Android)
|
||||
│ │
|
||||
│ ├── debug
|
||||
│ │
|
||||
|
||||
@@ -81,64 +81,17 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
string SourceDirectory = Path.GetFullPath(Path.Combine(PluginRootDirectory, "Source"));
|
||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(SourceDirectory, "ThirdParty"));
|
||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||
string LibraryPathAnroidArm64 = "";
|
||||
string LibraryPathAnroidx64 = "";
|
||||
string LibraryName = "sgconnect";
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||
|
||||
#if UE_5_1_OR_LATER
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||
#else
|
||||
Debug.Assert(false, "Developing for Android on UE versions older than 5.1 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")
|
||||
{
|
||||
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, "Unsupported Android architecture!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
||||
|
||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||
}
|
||||
@@ -197,21 +150,44 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
Debug.Assert(false, "Unsupported platform!");
|
||||
}
|
||||
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
|
||||
bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||
if (bDebug)
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
||||
}
|
||||
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
||||
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
|
||||
private void AddSerialLibrary(ReadOnlyTargetRules Target)
|
||||
@@ -220,64 +196,17 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
string SourceDirectory = Path.GetFullPath(Path.Combine(PluginRootDirectory, "Source"));
|
||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(SourceDirectory, "ThirdParty"));
|
||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||
string LibraryPathAnroidArm64 = "";
|
||||
string LibraryPathAnroidx64 = "";
|
||||
string LibraryName = "serial";
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||
|
||||
#if UE_5_1_OR_LATER
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||
#else
|
||||
Debug.Assert(false, "Developing for Android on UE versions older than 5.1 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")
|
||||
{
|
||||
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, "Unsupported Android architecture!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
||||
|
||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||
}
|
||||
@@ -336,20 +265,43 @@ public class SenseGloveConnectImpl : ModuleRules
|
||||
Debug.Assert(false, "Unsupported platform!");
|
||||
}
|
||||
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
|
||||
bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||
if (bDebug)
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
||||
}
|
||||
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
||||
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
}
|
||||
@@ -80,64 +80,17 @@ public class SenseGloveCoreImpl : ModuleRules
|
||||
string SourceDirectory = Path.GetFullPath(Path.Combine(PluginRootDirectory, "Source"));
|
||||
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(SourceDirectory, "ThirdParty"));
|
||||
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
|
||||
string LibraryPathAnroidArm64 = "";
|
||||
string LibraryPathAnroidx64 = "";
|
||||
string LibraryName = "sgcore";
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
|
||||
|
||||
#if UE_5_1_OR_LATER
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
|
||||
#else
|
||||
Debug.Assert(false, "Developing for Android on UE versions older than 5.1 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")
|
||||
{
|
||||
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, "Unsupported Android architecture!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
|
||||
|
||||
LibraryName = string.Format("lib{0}.a", LibraryName);
|
||||
}
|
||||
@@ -195,20 +148,43 @@ public class SenseGloveCoreImpl : ModuleRules
|
||||
Debug.Assert(false, "Unsupported platform!");
|
||||
}
|
||||
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
|
||||
bool bDebug = (Target.Configuration == UnrealTargetConfiguration.Debug);
|
||||
if (bDebug)
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Android)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
|
||||
}
|
||||
|
||||
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
|
||||
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
|
||||
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
|
||||
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
if (bDebug)
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
|
||||
}
|
||||
else
|
||||
{
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release"));
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
|
||||
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
|
||||
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
|
||||
|
||||
PrivateIncludePaths.Add(IncludePath);
|
||||
PublicAdditionalLibraries.Add(LibraryPath);
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user