Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. using System.IO;
  2. using UnrealBuildTool;
  3.  
  4. public class Vicon : ModuleRules
  5. {
  6.     private string ThirdPartyPath
  7.     {
  8.         get { return "C:/Users/Joeri/Documents/Unreal Projects/OculusRiftVicon/Source/ThirdParty/"; } // full path to third party folder
  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(ThirdPartyPath, "Vicon", "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( ThirdPartyPath, "Vicon", "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