make the plugin build with the upcoming ue 5.8, msvc 2026, and upcoming senseglove libraries v2.400.x

This commit is contained in:
Mamadou Babaei
2026-07-13 20:14:36 +02:00
parent b40babc9ee
commit 9f04f41644
577 changed files with 2090 additions and 1191 deletions
@@ -36,6 +36,7 @@
#include "SenseGlove/Engine/SGGameInstance.h"
#include "Engine/Engine.h"
#include "UObject/Class.h"
#include "SenseGlove/GameFramework/SGGameUserSettings.h"
#include "SGLog/SGLog.h"
@@ -45,13 +46,8 @@ void USGGameInstance::SG_GetEngineScalabilitySettings()
const USGGameUserSettings* GameUserSettings{USGGameUserSettings::GetInstance()};
ensureAlwaysMsgf(GameUserSettings, TEXT("Invalid GameUserSettings!"));
static UEnum* EnumPtr{StaticEnum<ESGEngineScalabilitySettings>()};
ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGEngineScalabilitySettings enum!"));
const ESGEngineScalabilitySettings Scalability = GameUserSettings->GetEngineScalabilitySettings();
const FName ScalabilityName{
EnumPtr->GetNameByValue(static_cast<int64>(Scalability))
};
const FName ScalabilityName{UEnum::GetValueAsName(Scalability)};
SGLOG("Get Engine Scalability Settings", ScalabilityName);
}
@@ -61,14 +57,9 @@ void USGGameInstance::SG_SetEngineScalabilitySettings(const ESGEngineScalability
USGGameUserSettings* GameUserSettings{USGGameUserSettings::GetInstance()};
ensureAlwaysMsgf(GameUserSettings, TEXT("Invalid GameUserSettings!"));
static UEnum* EnumPtr{StaticEnum<ESGEngineScalabilitySettings>()};
ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGEngineScalabilitySettings enum!"));
GameUserSettings->SetEngineScalabilitySettings(Scalability);
const FName ScalabilityName{
EnumPtr->GetNameByValue(static_cast<int64>(Scalability))
};
const FName ScalabilityName{UEnum::GetValueAsName(Scalability)};
SGLOG("Set Engine Scalability Settings", ScalabilityName);
}
@@ -38,6 +38,7 @@
#include "Engine/Engine.h"
#include "GameMapsSettings.h"
#include "Misc/CoreDelegates.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGLog/SGLog.h"
#include "SenseGlove/Engine/SGGameInstance.h"
@@ -51,8 +52,13 @@ void FSenseGloveModule::StartupModule()
{
SGLOG("Starting up the SenseGlove module...");
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8
OnPostEngineInitHandle = FCoreDelegates::GetOnPostEngineInit().AddRaw(
this, &FSenseGloveModule::OnPostEngineInit);
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 */
OnPostEngineInitHandle = FCoreDelegates::OnPostEngineInit.AddRaw(
this, &FSenseGloveModule::OnPostEngineInit);
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 */
}
void FSenseGloveModule::PreUnloadCallback()
@@ -69,7 +75,11 @@ void FSenseGloveModule::ShutdownModule()
{
SGLOG("Shutting down the SenseGlove module...");
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8
FCoreDelegates::GetOnPostEngineInit().Remove(OnPostEngineInitHandle);
#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 */
FCoreDelegates::OnPostEngineInit.Remove(OnPostEngineInitHandle);
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 8 */
}
void FSenseGloveModule::OnPostEngineInit() const
@@ -0,0 +1,36 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_DeviceTypes.h"
@@ -0,0 +1,44 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "HAL/Platform.h"
#include "SGBuildHacks/SGUndef_TEXT.h"
THIRD_PARTY_INCLUDES_START
#include "SenseGlove/Core/DeviceTypes.hpp"
THIRD_PARTY_INCLUDES_END
#include "SGBuildHacks/SGRestore_TEXT.h"
@@ -40,17 +40,17 @@
int32 FSGConnect::Init()
{
return SGConnect_Init();
return SGConnectImpl_Init();
}
int32 FSGConnect::Dispose()
{
return SGConnect_Dispose();
return SGConnectImpl_Dispose();
}
FString FSGConnect::GetLibraryVersion()
{
FSGIC_FString Container;
SGConnect_GetLibraryVersion(&Container);
SGConnectImpl_GetLibraryVersion(&Container);
return Container.String;
}
@@ -78,17 +78,17 @@ int32 SGConnectImpl_Android_Initialize(
* SGConnectImpl.h
******************************************************************************/
int32 SGConnect_Init()
int32 SGConnectImpl_Init()
{
return FSGConnectImpl::Init();
}
int32 SGConnect_Dispose()
int32 SGConnectImpl_Dispose()
{
return FSGConnectImpl::Dispose();
}
void SGConnect_GetLibraryVersion(void* OutVersion)
void SGConnectImpl_GetLibraryVersion(void* OutVersion)
{
StaticCast<FSGIC_FString*>(OutVersion)->String = FSGConnectImpl::GetLibraryVersion();
}
@@ -80,9 +80,9 @@ SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnectImpl_Android_Initialize(
* SGConnectImpl.h
******************************************************************************/
SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnect_Init();
SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnect_Dispose();
SENSEGLOVECONNECTIMPL_PUBLIC_API void SGConnect_GetLibraryVersion(void* OutVersion);
SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnectImpl_Init();
SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnectImpl_Dispose();
SENSEGLOVECONNECTIMPL_PUBLIC_API void SGConnectImpl_GetLibraryVersion(void* OutVersion);
/*******************************************************************************
******************************************************************************/
@@ -40,6 +40,11 @@ public class SenseGloveConnectImpl : ModuleRules
{
public SenseGloveConnectImpl(ReadOnlyTargetRules Target) : base(Target)
{
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bEnableExceptions = false;
@@ -57,17 +62,31 @@ public class SenseGloveConnectImpl : ModuleRules
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SGBleThirdPartyLibs",
"SGCommonThirdPartyLibs",
"SGConnectShmThirdPartyLibs",
"SGConnectThirdPartyLibs",
"SGSerialThirdPartyLibs",
"SGFmtThirdPartyLibs",
"SGLogThirdPartyLibs",
"SGLoguruThirdPartyLibs",
"SGWjwwoodSerialThirdPartyLibs",
}
);
if (bIsLinux || bIsLinuxArm64 || bIsWin64)
{
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SGBleThirdPartyLibs",
"SGConnectShmThirdPartyLibs",
"SGCoreShmThirdPartyLibs",
"SGFakeShmThirdPartyLibs",
"SGFlatBuffersThirdPartyLibs",
"SGNngThirdPartyLibs",
"SGSerialThirdPartyLibs",
"SGWjwwoodSerialThirdPartyLibs",
}
);
}
PrivateDependencyModuleNames.AddRange(
new string[]
{
@@ -37,11 +37,10 @@
#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h"
#include "SGBuildHacks/SGInclude_Core_DeviceTypes.h"
#include "SGBuildHacks/SGInclude_Core_Fingers.h"
#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h"
#include "SGBuildHacks/SGInclude_Core_HapticGlove.h"
#include "SGBuildHacks/SGInclude_Core_Library.h"
#include "SGBuildHacks/SGInclude_Core_NormalizationState.h"
#include "SGBuildHacks/SGInclude_Core_Nova2Glove.h"
#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h"
#include "SGBuildHacks/SGInclude_Core_NovaGlove.h"
@@ -40,6 +40,11 @@ public class SenseGloveCoreImpl : ModuleRules
{
public SenseGloveCoreImpl(ReadOnlyTargetRules Target) : base(Target)
{
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bEnableExceptions = false;
@@ -58,7 +63,6 @@ public class SenseGloveCoreImpl : ModuleRules
new string[]
{
"SGCommonThirdPartyLibs",
"SGCoreShmThirdPartyLibs",
"SGCoreThirdPartyLibs",
"SGLogThirdPartyLibs",
"SGFmtThirdPartyLibs",
@@ -66,6 +70,20 @@ public class SenseGloveCoreImpl : ModuleRules
}
);
if (bIsLinux || bIsLinuxArm64 || bIsWin64)
{
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SGConnectShmThirdPartyLibs",
"SGCoreShmThirdPartyLibs",
"SGFakeShmThirdPartyLibs",
"SGFlatBuffersThirdPartyLibs",
"SGNngThirdPartyLibs",
}
);
}
PrivateDependencyModuleNames.AddRange(
new string[]
{
@@ -50,6 +50,7 @@
#include "Misc/Optional.h"
#include "Misc/Timespan.h"
#include "OpenXRCore.h"
#include "UObject/Class.h"
#include "SGCore/SGHapticGlove.h"
#include "SGLog/SGLog.h"
@@ -60,7 +61,6 @@
#include "SGTypes/SGCoreTypes.h"
#include "SGTypes/SGTrackingTypes.h"
#include "SGUtils/SGEngineUtils.h"
#include "SGUtils/SGPluginUtils.h"
struct FSGXRTracker::FImpl
{
@@ -731,12 +731,10 @@ FName FSGXRTracker::FImpl::GetControllerHandEnumName(const EControllerHand Contr
FName FSGXRTracker::FImpl::GetOpenXRPositionalTrackingProviderEnumName(
const ESGOpenXRPositionalTrackingProvider OpenXRPositionalTrackingProvider)
{
static UEnum* EnumPtr{StaticEnum<ESGOpenXRPositionalTrackingProvider>()};
ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGOpenXRPositionalTrackingProvider enum!"));
static const int32 EnumNameLength = FString{TEXT("ESGOpenXRPositionalTrackingProvider::")}.Len();
const FName EnumItemName{
EnumPtr->GetNameByValue(static_cast<int64>(OpenXRPositionalTrackingProvider))
UEnum::GetValueAsName(OpenXRPositionalTrackingProvider)
};
const FString EnumItemString{EnumItemName.ToString()};
const int32 EnumItemStringLength = EnumItemString.Len();
@@ -40,7 +40,6 @@
#include "IInputDevice.h"
#include "IOpenXRExtensionPlugin.h"
#include "Math/MathFwd.h"
#include "Runtime/Launch/Resources/Version.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "XRMotionControllerBase.h"
@@ -38,6 +38,8 @@
#include "HAL/Platform.h"
#include "UObject/ObjectMacros.h"
#include "SGCoreTypes.generated.h"
UENUM(BlueprintType)
enum class ESGBackendType : uint8
{
@@ -39,6 +39,8 @@
#include "HAL/Platform.h"
#include "UObject/ObjectMacros.h"
#include "SGDebugTypes.generated.h"
/**
* Determines the debug virtual hand drawing mode.
*/
@@ -38,6 +38,8 @@
#include "HAL/Platform.h"
#include "UObject/ObjectMacros.h"
#include "SGTrackingTypes.generated.h"
/**
* The Head-mounted Display device enum to determine the HMD device type.
*/
@@ -38,6 +38,8 @@
#include "HAL/Platform.h"
#include "UObject/ObjectMacros.h"
#include "SGTypes.generated.h"
/**
* The engine scalability settings.
*/
@@ -51,31 +51,13 @@ public class SGBleThirdPartyLibs : ModuleRules
string LibraryPathAnroidX64 = "";
string LibraryName = "sgble";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinux)
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc"));
@@ -107,40 +89,18 @@ public class SGBleThirdPartyLibs : ModuleRules
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsAndroid)
if (bIsDebugBuild)
{
if (bIsDebugBuild)
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
}
else
{
if (bIsDebugBuild)
{
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, "release"));
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
PublicAdditionalLibraries.Add(LibraryPath);
if (bIsWin64)
{
PublicAdditionalLibraries.AddRange(new string[]
@@ -116,8 +116,25 @@ public class SGCommonThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -47,35 +47,15 @@ public class SGConnectShmThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgconnectshm";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinux)
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
@@ -116,8 +96,25 @@ public class SGConnectShmThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -136,38 +133,16 @@ public class SGConnectShmThirdPartyLibs : ModuleRules
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsAndroid)
if (bIsDebugBuild)
{
if (bIsDebugBuild)
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
}
else
{
if (bIsDebugBuild)
{
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, "release"));
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
PublicAdditionalLibraries.Add(LibraryPath);
}
}
@@ -116,8 +116,25 @@ public class SGConnectThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -47,35 +47,15 @@ public class SGCoreShmThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgcoreshm";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinux)
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
@@ -116,8 +96,25 @@ public class SGCoreShmThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -136,38 +133,16 @@ public class SGCoreShmThirdPartyLibs : ModuleRules
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsAndroid)
if (bIsDebugBuild)
{
if (bIsDebugBuild)
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
}
else
{
if (bIsDebugBuild)
{
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, "release"));
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
PublicAdditionalLibraries.Add(LibraryPath);
}
}
@@ -116,8 +116,25 @@ public class SGCoreThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -0,0 +1,148 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnrealBuildTool;
public class SGFakeShmThirdPartyLibs : ModuleRules
{
public SGFakeShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryName = "sgfakeshm";
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinuxArm64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
break;
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("{0}.lib", LibraryName);
}
else
{
Debug.Assert(false, "Unsupported platform!");
}
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsDebugBuild)
{
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);
}
}
@@ -0,0 +1,148 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnrealBuildTool;
public class SGFlatBuffersThirdPartyLibs : ModuleRules
{
public SGFlatBuffersThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryName = "flatbuffers";
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinuxArm64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
break;
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("{0}.lib", LibraryName);
}
else
{
Debug.Assert(false, "Unsupported platform!");
}
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsDebugBuild)
{
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);
}
}
@@ -121,8 +121,25 @@ public class SGFmtThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -116,8 +116,25 @@ public class SGLogThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -121,8 +121,25 @@ public class SGLoguruThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -0,0 +1,148 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2026 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnrealBuildTool;
public class SGNngThirdPartyLibs : ModuleRules
{
public SGNngThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryName = "nng";
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinuxArm64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26"));
#elif UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
break;
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("{0}.lib", LibraryName);
}
else
{
Debug.Assert(false, "Unsupported platform!");
}
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsDebugBuild)
{
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);
}
}
@@ -47,35 +47,15 @@ public class SGSerialThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgserial";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinux)
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
@@ -116,8 +96,25 @@ public class SGSerialThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -136,38 +133,16 @@ public class SGSerialThirdPartyLibs : ModuleRules
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsAndroid)
if (bIsDebugBuild)
{
if (bIsDebugBuild)
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
}
else
{
if (bIsDebugBuild)
{
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, "release"));
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
PublicAdditionalLibraries.Add(LibraryPath);
}
}
@@ -47,35 +47,15 @@ public class SGWjwwoodSerialThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "serial";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64;
bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) &&
Target.WindowsPlatform.Architecture == UnrealArch.X64;
bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug);
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsLinux)
if (bIsLinux)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
@@ -116,8 +96,25 @@ public class SGWjwwoodSerialThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
#if UE_5_7_OR_LATER
case WindowsCompiler.VisualStudio2026:
#if UE_5_8_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v145-1450"));
#elif UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
#endif
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
#if UE_5_7_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1444"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143-1438"));
#else
Debug.Assert(false, "Unsupported engine version or compiler!");
#endif
break;
default:
Debug.Assert(false, "Unsupported engine version or compiler!");
@@ -136,38 +133,16 @@ public class SGWjwwoodSerialThirdPartyLibs : ModuleRules
string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include"));
PrivateIncludePaths.Add(IncludePath);
if (bIsAndroid)
if (bIsDebugBuild)
{
if (bIsDebugBuild)
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug"));
}
else
{
if (bIsDebugBuild)
{
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, "release"));
}
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName));
PublicAdditionalLibraries.Add(LibraryPath);
}
}
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.
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.
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.

Some files were not shown because too many files have changed in this diff Show More