Files
UnrealEngineUWP/Engine/Source/ThirdParty/Box2D/Box2D.Build.cs
Michael Noland 775efd9763 Physics: Move 2D physics support into Engine (WIP)
#codereview ori.cohen

[CL 2089854 by Michael Noland in Main branch]
2014-05-30 13:28:52 -04:00

46 lines
1.6 KiB
C#

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System;
using System.IO;
public class Box2D : ModuleRules
{
public Box2D(TargetInfo Target)
{
Type = ModuleType.External;
// Determine the root directory of Box2D
string ModuleCSFilename = UnrealBuildTool.RulesCompiler.GetModuleFilename(this.GetType().Name);
string ModuleBaseDirectory = Path.GetDirectoryName(ModuleCSFilename);
string Box2DBaseDir = Path.Combine(ModuleBaseDirectory, "Box2D_v2.3.1");
// Add the libraries for the current platform
//@TODO: This need to be kept in sync with RulesCompiler.cs for now
bool bSupported = false;
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
bSupported = true;
string WindowsVersion = "vs" + WindowsPlatform.GetVisualStudioCompilerVersionName();
string ArchitectureVersion = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x32";
string ConfigVersion = (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT) ? "Debug" : "Release";
string Box2DLibDir = Path.Combine(Box2DBaseDir, "build", WindowsVersion, "bin", ArchitectureVersion, ConfigVersion);
PublicLibraryPaths.Add(Box2DLibDir);
string LibName = "Box2D.lib";
PublicAdditionalLibraries.Add(LibName);
}
// Box2D included define (this should be handled by using SetupModuleBox2DSupport instead)
//Definitions.Add(string.Format("WITH_BOX2D={0}", bSupported ? 1 : 0));
if (bSupported)
{
// Include path
PublicIncludePaths.Add(Box2DBaseDir);
}
}
}