mirror of
https://github.com/storytold/UnrealZeroMQ.git
synced 2026-10-18 07:33:29 +00:00
init commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "ZeroMQ.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FZeroMQModule"
|
||||
|
||||
void FZeroMQModule::StartupModule()
|
||||
{
|
||||
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
|
||||
}
|
||||
|
||||
void FZeroMQModule::ShutdownModule()
|
||||
{
|
||||
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
|
||||
// we call this function before unloading the module.
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FZeroMQModule, ZeroMQ)
|
||||
@@ -0,0 +1,15 @@
|
||||
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
class FZeroMQModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
|
||||
/** IModuleInterface implementation */
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
using UnrealBuildTool;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
public class ZeroMQ : ModuleRules
|
||||
{
|
||||
private string ThirdPartyPath
|
||||
{
|
||||
get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "ThirdParty")); }
|
||||
}
|
||||
|
||||
private string ZeroMQRootPath
|
||||
{
|
||||
get { return Path.GetFullPath(Path.Combine(ThirdPartyPath, "libzmq_4.3.1")); }
|
||||
}
|
||||
|
||||
public void AddZeroMQ(ReadOnlyTargetRules Target)
|
||||
{
|
||||
// add headers
|
||||
PublicIncludePaths.Add(Path.Combine(ZeroMQRootPath, "include"));
|
||||
|
||||
// tell library that it is statically linked
|
||||
PublicDefinitions.Add("ZMQ_STATIC");
|
||||
|
||||
string staticLibrary = "";
|
||||
switch (Target.Platform)
|
||||
{
|
||||
case UnrealTargetPlatform.Win64:
|
||||
staticLibrary = Path.Combine(ZeroMQRootPath, "Windows", "x64", "libzmq-v141-mt-s-4_3_2.lib");
|
||||
break;
|
||||
case UnrealTargetPlatform.Win32:
|
||||
staticLibrary = Path.Combine(ZeroMQRootPath, "Windows", "x86", "libzmq-v141-mt-s-4_3_2.lib");
|
||||
break;
|
||||
case UnrealTargetPlatform.Linux:
|
||||
staticLibrary = Path.Combine(ZeroMQRootPath, "Linux", "libzmq.a");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("unsupported target platform: %s", Target.Platform);
|
||||
Debug.Assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (Target.Configuration == UnrealTargetConfiguration.Development)
|
||||
{
|
||||
bEnableExceptions = true;
|
||||
}
|
||||
|
||||
Console.WriteLine("Using ZeroMQ static library: {0}", staticLibrary);
|
||||
PublicAdditionalLibraries.Add(staticLibrary);
|
||||
}
|
||||
|
||||
|
||||
public ZeroMQ(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
PublicDependencyModuleNames.AddRange(new string[] {"Core"});
|
||||
AddZeroMQ(Target);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user