Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 KB | None | 0 0
  1. using System.IO;
  2. using UnrealBuildTool;
  3.  
  4. public class Vicon : ModuleRules
  5. {
  6.     private string ModulePath
  7.     {
  8.         get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }
  9.     }
  10.  
  11.     public Vicon(TargetInfo Target)
  12.     {
  13.         LoadVicon(Target);
  14.     }
  15.    
  16.     public bool LoadVicon(TargetInfo Target)
  17.     {
  18.         bool isLibrarySupported = false;
  19.  
  20.         if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
  21.         {  
  22.             isLibrarySupported = true;
  23.  
  24.             string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
  25.             string LibrariesPath = Path.Combine( ModulePath, "Libraries");
  26.  
  27.             PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "ViconDataStreamSDK_CPP." + PlatformString + ".lib"));
  28.         }
  29.  
  30.         if (isLibrarySupported)
  31.         {
  32.             // Include path
  33.             PublicIncludePaths.Add( Path.Combine( ModulePath, "Includes" ) );
  34.         }
  35.  
  36.         Definitions.Add(string.Format( "WITH_VICON_BINDING={0}", isLibrarySupported ? 1 : 0 ) );
  37.  
  38.         return isLibrarySupported;
  39.     }
  40.    
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement