integrate sensglove libraries v2.301.0-c70bce637 and the required refactor to make it build/work

This commit is contained in:
Mamadou Babaei
2025-11-18 03:44:25 +01:00
parent 36e40fa626
commit 700e301b43
370 changed files with 2220 additions and 506 deletions
@@ -42,8 +42,8 @@ public class SenseGloveConnectImpl : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bEnableExceptions = true;
bUseRTTI = true;
bEnableExceptions = false;
bUseRTTI = false;
PrivateDependencyModuleNames.AddRange(
new string[]
@@ -58,8 +58,13 @@ public class SenseGloveConnectImpl : ModuleRules
new string[]
{
"SGBleThirdPartyLibs",
"SGCommonThirdPartyLibs",
"SGConnectShmThirdPartyLibs",
"SGConnectThirdPartyLibs",
"SGSerialThirdPartyLibs",
"SGFmtThirdPartyLibs",
"SGLoguruThirdPartyLibs",
"SGWjwwoodSerialThirdPartyLibs",
}
);
@@ -35,6 +35,8 @@
#include "SGCoreImpl/SGBetaDeviceImpl.h"
#include <memory>
#include "Containers/StringConv.h"
#include "Misc/AssertionMacros.h"
@@ -70,7 +72,7 @@ TSharedRef<FSGBetaDeviceImpl> FSGBetaDeviceImpl::Parse(const FString& String)
FSGDevicePtrType SGDevicePtr{FBetaDeviceType::Parse(TCHAR_TO_UTF8(*String))};
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
const TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
MakeShared<FSGBetaDeviceImpl>(std::dynamic_pointer_cast<FBetaDeviceType>(MoveTemp(SGDevicePtr)))
MakeShared<FSGBetaDeviceImpl>(std::static_pointer_cast<FBetaDeviceType>(MoveTemp(SGDevicePtr)))
};
return BetaDeviceImpl;
}
@@ -133,12 +135,12 @@ FSGBetaDeviceImpl::FBetaDeviceType FSGBetaDeviceImpl::ToBetaDevice() const
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtr() const
{
return std::dynamic_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
return std::static_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
}
FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtrChecked() const
{
FBetaDevicePtrType BetaDevice = std::dynamic_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
FBetaDevicePtrType BetaDevice = std::static_pointer_cast<FBetaDeviceType>(ToSGDevicePtr());
ensureAlwaysMsgf(BetaDevice.get(), TEXT("Invalid BetaDevice"));
return BetaDevice;
}
@@ -35,6 +35,7 @@
#include "SGCoreImpl/SGDeviceImpl.h"
#include <memory>
#include <string>
#include "Containers/StringConv.h"
@@ -157,35 +158,35 @@ TSharedRef<FSGDeviceImpl> FSGDeviceImpl::ToSGDeviceImplRef()
TSharedRef<FSGBetaDeviceImpl> FSGDeviceImpl::ToBetaDeviceImplRef()
{
FSGBetaDeviceImpl* BetaDevice{dynamic_cast<FSGBetaDeviceImpl*>(this)};
FSGBetaDeviceImpl* BetaDevice{static_cast<FSGBetaDeviceImpl*>(this)};
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
return SharedThis(BetaDevice);
}
TSharedRef<FSGHapticGloveImpl> FSGDeviceImpl::ToHapticGloveImplRef()
{
FSGHapticGloveImpl* HapticGlove{dynamic_cast<FSGHapticGloveImpl*>(this)};
FSGHapticGloveImpl* HapticGlove{static_cast<FSGHapticGloveImpl*>(this)};
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
return SharedThis(HapticGlove);
}
TSharedRef<FSGNova2GloveImpl> FSGDeviceImpl::ToNova2GloveImplRef()
{
FSGNova2GloveImpl* Nova2Glove{dynamic_cast<FSGNova2GloveImpl*>(this)};
FSGNova2GloveImpl* Nova2Glove{static_cast<FSGNova2GloveImpl*>(this)};
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
return SharedThis(Nova2Glove);
}
TSharedRef<FSGNovaGloveImpl> FSGDeviceImpl::ToNovaGloveImplRef()
{
FSGNovaGloveImpl* NovaGlove{dynamic_cast<FSGNovaGloveImpl*>(this)};
FSGNovaGloveImpl* NovaGlove{static_cast<FSGNovaGloveImpl*>(this)};
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
return SharedThis(NovaGlove);
}
TSharedRef<FSGSenseGloveImpl> FSGDeviceImpl::ToSenseGloveImplRef()
{
FSGSenseGloveImpl* SenseGlove{dynamic_cast<FSGSenseGloveImpl*>(this)};
FSGSenseGloveImpl* SenseGlove{static_cast<FSGSenseGloveImpl*>(this)};
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
return SharedThis(SenseGlove);
}
@@ -193,7 +194,7 @@ TSharedRef<FSGSenseGloveImpl> FSGDeviceImpl::ToSenseGloveImplRef()
bool FSGDeviceImpl::IsABetaDevice() const
{
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
};
return BetaDevice != nullptr;
}
@@ -201,7 +202,7 @@ bool FSGDeviceImpl::IsABetaDevice() const
bool FSGDeviceImpl::IsAHapticGlove() const
{
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
std::dynamic_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
};
return HapticGlove != nullptr;
}
@@ -209,7 +210,7 @@ bool FSGDeviceImpl::IsAHapticGlove() const
bool FSGDeviceImpl::IsANova2Glove() const
{
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
};
return Nova2Glove != nullptr;
}
@@ -217,7 +218,7 @@ bool FSGDeviceImpl::IsANova2Glove() const
bool FSGDeviceImpl::IsANovaGlove() const
{
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
};
return NovaGlove != nullptr;
}
@@ -225,7 +226,7 @@ bool FSGDeviceImpl::IsANovaGlove() const
bool FSGDeviceImpl::IsASenseGlove() const
{
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
};
return SenseGlove != nullptr;
}
@@ -233,7 +234,7 @@ bool FSGDeviceImpl::IsASenseGlove() const
TSharedPtr<FSGBetaDeviceImpl> FSGDeviceImpl::AsBetaDevice() const
{
const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(ToSGDevicePtr())
};
ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"));
return MakeShared<FSGBetaDeviceImpl>(BetaDevice);
@@ -242,7 +243,7 @@ TSharedPtr<FSGBetaDeviceImpl> FSGDeviceImpl::AsBetaDevice() const
TSharedPtr<FSGHapticGloveImpl> FSGDeviceImpl::AsHapticGlove() const
{
const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{
std::dynamic_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGHapticGloveImpl::FHapticGloveType>(ToSGDevicePtr())
};
ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!"));
return MakeShared<FSGHapticGloveImpl>(HapticGlove);
@@ -251,7 +252,7 @@ TSharedPtr<FSGHapticGloveImpl> FSGDeviceImpl::AsHapticGlove() const
TSharedPtr<FSGNova2GloveImpl> FSGDeviceImpl::AsNova2Glove() const
{
const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(ToSGDevicePtr())
};
ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!"));
return MakeShared<FSGNova2GloveImpl>(Nova2Glove);
@@ -260,7 +261,7 @@ TSharedPtr<FSGNova2GloveImpl> FSGDeviceImpl::AsNova2Glove() const
TSharedPtr<FSGNovaGloveImpl> FSGDeviceImpl::AsNovaGlove() const
{
const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(ToSGDevicePtr())
};
ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!"));
return MakeShared<FSGNovaGloveImpl>(NovaGlove);
@@ -269,7 +270,7 @@ TSharedPtr<FSGNovaGloveImpl> FSGDeviceImpl::AsNovaGlove() const
TSharedPtr<FSGSenseGloveImpl> FSGDeviceImpl::AsSenseGlove() const
{
const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(ToSGDevicePtr())
};
ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!"));
return MakeShared<FSGSenseGloveImpl>(SenseGlove);
@@ -35,6 +35,7 @@
#include "SGCoreImpl/SGDeviceListImpl.h"
#include <memory>
#include <string>
#include "Containers/StringConv.h"
@@ -83,7 +84,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
case ESGDeviceType::BetaDevice:
{
FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice =
std::dynamic_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(Device);
std::static_pointer_cast<FSGBetaDeviceImpl::FBetaDeviceType>(Device);
if (ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!")))
{
TSharedRef<FSGBetaDeviceImpl> BetaDeviceImpl{
@@ -97,7 +98,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
case ESGDeviceType::Nova2:
{
FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove =
std::dynamic_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(Device);
std::static_pointer_cast<FSGNova2GloveImpl::FNova2GloveType>(Device);
if (ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove device!")))
{
TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{MakeShared<FSGNova2GloveImpl>(Nova2Glove)};
@@ -109,7 +110,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
case ESGDeviceType::Nova:
{
FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove =
std::dynamic_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(Device);
std::static_pointer_cast<FSGNovaGloveImpl::FNovaGloveType>(Device);
if (ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove device!")))
{
TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(NovaGlove)};
@@ -121,7 +122,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
case ESGDeviceType::SenseGlove:
{
FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{
std::dynamic_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(Device)};
std::static_pointer_cast<FSGSenseGloveImpl::FSenseGloveType>(Device)};
if (ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove device!")))
{
TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
@@ -134,7 +135,7 @@ TArray<TSharedRef<FSGDeviceImpl>> FSGDeviceListImpl::GetDevices()
default:
SGLOG_WARNING(
FString::Printf(TEXT("Unknown SenseGlove device '%s'!"), UTF8_TO_TCHAR(typeid(Device).name())),
FString::Printf(TEXT("Unknown SenseGlove device '%s'!"), *UEnum::GetValueAsString(FSGCoreEnumCast::ToESGDeviceType(Device->GetDeviceType()))),
FString::Printf(TEXT("Device ID: '%s'!"), UTF8_TO_TCHAR(Device->GetDeviceId().c_str())),
FString::Printf(TEXT("Hardware Version: '%s'!"), UTF8_TO_TCHAR(Device->GetHardwareVersion().c_str())),
FString::Printf(TEXT("Firmware Version: '%d'!"), Device->GetFirmwareVersion()),
@@ -140,7 +140,7 @@ FSGHapticGloveImpl::FSGHapticGloveImpl()
}
FSGHapticGloveImpl::FSGHapticGloveImpl(const FHapticGlovePtrType HapticGlove)
: FSGDeviceImpl(std::dynamic_pointer_cast<FSGDeviceType>(HapticGlove)),
: FSGDeviceImpl(std::static_pointer_cast<FSGDeviceType>(HapticGlove)),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
}
@@ -168,12 +168,12 @@ FSGHapticGloveImpl& FSGHapticGloveImpl::operator=(FSGHapticGloveImpl&& Rhs) SG_N
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtr() const
{
return std::dynamic_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
return std::static_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
}
FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtrChecked() const
{
FHapticGlovePtrType HapticGlove = std::dynamic_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
FHapticGlovePtrType HapticGlove = std::static_pointer_cast<FHapticGloveType>(ToSGDevicePtr());
ensureAlwaysMsgf(HapticGlove.get(), TEXT("Invalid HapticGlove"));
return HapticGlove;
}
@@ -93,7 +93,7 @@ TSharedRef<FSGDeviceImpl> FSGNova2GloveImpl::Parse(const FString& ConstantsStrin
FSGDevicePtrType SGDevicePtr{FNova2GloveType::Parse(MoveTemp(ConstantsStdString))};
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
const TSharedRef<FSGNova2GloveImpl> Nova2GloveImpl{
MakeShared<FSGNova2GloveImpl>(std::dynamic_pointer_cast<FNova2GloveType>(MoveTemp(SGDevicePtr)))
MakeShared<FSGNova2GloveImpl>(std::static_pointer_cast<FNova2GloveType>(MoveTemp(SGDevicePtr)))
};
return Nova2GloveImpl;
}
@@ -275,12 +275,12 @@ const FSGNova2GloveImpl::FNova2GloveType& FSGNova2GloveImpl::ToNova2Glove() cons
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtr() const
{
return std::dynamic_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
return std::static_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
}
FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtrChecked() const
{
FNova2GlovePtrType Nova2Glove = std::dynamic_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
FNova2GlovePtrType Nova2Glove = std::static_pointer_cast<FNova2GloveType>(ToSGDevicePtr());
ensureAlwaysMsgf(Nova2Glove.get(), TEXT("Invalid Nova2Glove"));
return Nova2Glove;
}
@@ -95,7 +95,7 @@ TSharedRef<FSGDeviceImpl> FSGNovaGloveImpl::Parse(const FString& ConstantsString
FSGDevicePtrType SGDevicePtr{FNovaGloveType::Parse(MoveTemp(ConstantsStdString))};
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
const TSharedRef<FSGNovaGloveImpl> NovaGloveImpl{MakeShared<FSGNovaGloveImpl>(
std::dynamic_pointer_cast<FNovaGloveType>(MoveTemp(SGDevicePtr)))};
std::static_pointer_cast<FNovaGloveType>(MoveTemp(SGDevicePtr)))};
return NovaGloveImpl;
}
@@ -288,12 +288,12 @@ const FSGNovaGloveImpl::FNovaGloveType& FSGNovaGloveImpl::ToNovaGlove() const
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtr() const
{
return std::dynamic_pointer_cast<FNovaGloveType>(ToSGDevicePtr());
return std::static_pointer_cast<FNovaGloveType>(ToSGDevicePtr());
}
FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtrChecked() const
{
FNovaGlovePtrType NovaGlove{std::dynamic_pointer_cast<FNovaGloveType>(ToSGDevicePtr())};
FNovaGlovePtrType NovaGlove{std::static_pointer_cast<FNovaGloveType>(ToSGDevicePtr())};
ensureAlwaysMsgf(NovaGlove.get(), TEXT("Invalid NovaGlove"));
return NovaGlove;
}
@@ -93,7 +93,7 @@ TSharedRef<FSGDeviceImpl> FSGSenseGloveImpl::Parse(const FString& ConstantsStrin
FSGDevicePtrType SGDevicePtr{FSenseGloveType::Parse(MoveTemp(ConstantsStdString))};
ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!"));
const TSharedRef<FSGSenseGloveImpl> SenseGloveImpl{
MakeShared<FSGSenseGloveImpl>(std::dynamic_pointer_cast<FSenseGloveType>(MoveTemp(SGDevicePtr)))
MakeShared<FSGSenseGloveImpl>(std::static_pointer_cast<FSenseGloveType>(MoveTemp(SGDevicePtr)))
};
return SenseGloveImpl;
}
@@ -277,7 +277,7 @@ FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGloveType SenseGlove)
}
FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGlovePtrType SenseGlove)
: FSGHapticGloveImpl(std::dynamic_pointer_cast<FHapticGloveType>(SenseGlove)),
: FSGHapticGloveImpl(std::static_pointer_cast<FHapticGloveType>(SenseGlove)),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
}
@@ -310,12 +310,12 @@ const FSGSenseGloveImpl::FSenseGloveType& FSGSenseGloveImpl::ToSenseGlove() cons
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtr() const
{
return std::dynamic_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
return std::static_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
}
FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtrChecked() const
{
FSenseGlovePtrType SenseGlove = std::dynamic_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
FSenseGlovePtrType SenseGlove = std::static_pointer_cast<FSenseGloveType>(ToSGDevicePtr());
ensureAlwaysMsgf(SenseGlove.get(), TEXT("Invalid SenseGlove"));
return SenseGlove;
}
@@ -64,15 +64,35 @@ public:
template <typename T>
static TArray<TSharedRef<FSGDeviceImpl>> GetDevices()
{
const std::type_info& TType = typeid(T);
ESGDeviceType TargetType = ESGDeviceType::Unknown;
if constexpr (std::is_same_v<T, FSGNova2GloveImpl>)
{
TargetType = ESGDeviceType::Nova2;
}
else if constexpr (std::is_same_v<T, FSGNovaGloveImpl>)
{
TargetType = ESGDeviceType::Nova;
}
else if constexpr (std::is_same_v<T, FSGSenseGloveImpl>)
{
TargetType = ESGDeviceType::SenseGlove;
}
else if constexpr (std::is_same_v<T, FSGBetaDeviceImpl>)
{
TargetType = ESGDeviceType::BetaDevice;
}
else
{
static_assert(!sizeof(T), "Unsupported device type in GetDevices<T>()");
}
const TArray<TSharedRef<FSGDeviceImpl>> CurrentDevices = GetDevices();
TArray<TSharedRef<FSGDeviceImpl>> Devices;
for (TSharedRef<FSGDeviceImpl> Device : CurrentDevices)
{
auto &d = Device.Get();
const std::type_info& DType = typeid(d);
if (DType.hash_code() == TType.hash_code())
if (Device->GetDeviceType() == TargetType)
{
Devices.Push(Device);
}
@@ -42,8 +42,8 @@ public class SenseGloveCoreImpl : ModuleRules
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
bEnableExceptions = true;
bUseRTTI = true;
bEnableExceptions = false;
bUseRTTI = false;
PrivateDependencyModuleNames.AddRange(
new string[]
@@ -57,7 +57,12 @@ public class SenseGloveCoreImpl : ModuleRules
PrivateDependencyModuleNames.AddRange(
new string[]
{
"SGCommonThirdPartyLibs",
"SGCoreShmThirdPartyLibs",
"SGCoreThirdPartyLibs",
"SGLogThirdPartyLibs",
"SGFmtThirdPartyLibs",
"SGLoguruThirdPartyLibs",
}
);
@@ -47,8 +47,8 @@ public class SGBleThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidArm64 = "";
string LibraryPathAnroidx64 = "";
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgble";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
@@ -63,8 +63,8 @@ public class SGBleThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
@@ -86,8 +86,9 @@ public class SGBleThirdPartyLibs : ModuleRules
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64"));
LibraryName = string.Format("{0}.lib", LibraryName);
}
@@ -103,20 +104,20 @@ public class SGBleThirdPartyLibs : ModuleRules
{
if (bIsDebugBuild)
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
}
else
{
@@ -0,0 +1,166 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGCommonThirdPartyLibs : ModuleRules
{
public SGCommonThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgcommon";
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"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -0,0 +1,166 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGConnectShmThirdPartyLibs : ModuleRules
{
public SGConnectShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
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"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -47,7 +47,7 @@ public class SGConnectThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidArm64 = "";
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidx64 = "";
string LibraryName = "sgconnect";
@@ -63,15 +63,14 @@ public class SGConnectThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -84,11 +83,12 @@ public class SGConnectThirdPartyLibs : ModuleRules
#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"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -101,20 +101,24 @@ public class SGConnectThirdPartyLibs : ModuleRules
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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
@@ -129,19 +133,19 @@ public class SGConnectThirdPartyLibs : ModuleRules
{
if (bIsDebugBuild)
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
}
else
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
}
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
}
else
@@ -0,0 +1,166 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGCoreShmThirdPartyLibs : ModuleRules
{
public SGCoreShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
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"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -47,8 +47,8 @@ public class SGCoreThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidArm64 = "";
string LibraryPathAnroidx64 = "";
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgcore";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
@@ -63,15 +63,14 @@ public class SGCoreThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -84,11 +83,12 @@ public class SGCoreThirdPartyLibs : ModuleRules
#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"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -101,20 +101,24 @@ public class SGCoreThirdPartyLibs : ModuleRules
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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
@@ -129,20 +133,20 @@ public class SGCoreThirdPartyLibs : ModuleRules
{
if (bIsDebugBuild)
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
}
else
{
@@ -0,0 +1,171 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGFmtThirdPartyLibs : ModuleRules
{
public SGFmtThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "fmt";
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 (bIsDebugBuild)
{
LibraryName += "d";
}
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -0,0 +1,166 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGLogThirdPartyLibs : ModuleRules
{
public SGLogThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sglog";
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"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -0,0 +1,171 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGLoguruThirdPartyLibs : ModuleRules
{
public SGLoguruThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "loguru";
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 (bIsDebugBuild)
{
LibraryName += "d";
}
if (bIsAndroid)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
@@ -47,9 +47,9 @@ public class SGSerialThirdPartyLibs : ModuleRules
string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib"));
string LibraryPathAnroidArm64 = "";
string LibraryPathAnroidx64 = "";
string LibraryName = "serial";
string LibraryPathAnroidAArch64 = "";
string LibraryPathAnroidX64 = "";
string LibraryName = "sgserial";
bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android);
bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux;
@@ -63,15 +63,14 @@ public class SGSerialThirdPartyLibs : ModuleRules
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPath, "arm64"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x64"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -84,11 +83,12 @@ public class SGSerialThirdPartyLibs : ModuleRules
#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"));
LibraryName = string.Format("lib{0}.a", LibraryName);
#if UE_5_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
@@ -101,20 +101,24 @@ public class SGSerialThirdPartyLibs : ModuleRules
#endif
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64"));
LibraryName = string.Format("lib{0}.a", LibraryName);
}
else if (bIsWin64)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "win64"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows"));
switch (Target.WindowsPlatform.Compiler)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "msvc143"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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
@@ -129,20 +133,20 @@ public class SGSerialThirdPartyLibs : ModuleRules
{
if (bIsDebugBuild)
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "debug"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug"));
}
else
{
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, "release"));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release"));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release"));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release"));
}
LibraryPathAnroidArm64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidArm64, LibraryName));
LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName));
LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName));
LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName));
PublicAdditionalLibraries.Add(LibraryPathAnroidArm64);
PublicAdditionalLibraries.Add(LibraryPathAnroidx64);
PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64);
PublicAdditionalLibraries.Add(LibraryPathAnroidX64);
}
else
{
@@ -0,0 +1,166 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2025 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 SGWjwwoodSerialThirdPartyLibs : ModuleRules
{
public SGWjwwoodSerialThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
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"));
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b"));
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)
{
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux"));
#if 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"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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_6_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25"));
#elif UE_5_5_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23"));
#elif UE_5_4_OR_LATER
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v22"));
#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)
{
case WindowsCompiler.VisualStudio2022:
LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143"));
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 (bIsAndroid)
{
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);
}
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);
}
}
}
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.
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