From c0f9acb9aa916384dc5020937c47fa6717d603f5 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 28 Feb 2021 01:32:07 -0500 Subject: [PATCH] Monkey patch for Unreal Engine 4.25+ --- Source/ZeroMQ/ZeroMQ.Build.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/ZeroMQ/ZeroMQ.Build.cs b/Source/ZeroMQ/ZeroMQ.Build.cs index 3bad9ff..f0988a8 100644 --- a/Source/ZeroMQ/ZeroMQ.Build.cs +++ b/Source/ZeroMQ/ZeroMQ.Build.cs @@ -25,7 +25,19 @@ public class ZeroMQ : ModuleRules // tell library that it is statically linked PublicDefinitions.Add("ZMQ_STATIC"); + // NB(bt): This isn't compiling for Unreal Engine 4.25: + // Error CS0151 + // A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type + // c:\Users\echel\OneDrive\Documents\Unreal Projects\AzureKinect\Plugins\UnrealZeroMQ\Source\ZeroMQ\ZeroMQ.Build.cs 29 + // + // I'll hardcode the results for Windows x64 for now. + // Sorry for being a bad citizen to other platforms, especially Linux. :( + + string staticLibrary = Path.Combine(ZeroMQRootPath, "Windows", "x64", "libzmq-v141-mt-s-4_3_2.lib"); + + /* string staticLibrary = ""; + switch (Target.Platform) { case UnrealTargetPlatform.Win64: @@ -45,7 +57,7 @@ public class ZeroMQ : ModuleRules Console.WriteLine("unsupported target platform: %s", Target.Platform); Debug.Assert(false); break; - } + }*/ bEnableExceptions = true;