Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
- using UnrealBuildTool;
- using System.IO;
- public class TestPLC : ModuleRules
- {
- private string ModulePath
- {
- get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }
- }
- private string ThirdPartyPath
- {
- get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); }
- }
- public bool LoadSnap7(TargetInfo Target)
- {
- bool isLibrarySupported = false;
- if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
- {
- isLibrarySupported = true;
- string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
- string LibrariesPath = Path.Combine(ThirdPartyPath, "Snap7", "Libraries");
- //PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Snap7." + PlatformString + ".lib"));
- PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Snap7.lib"));
- }
- if (isLibrarySupported)
- {
- // Include path
- PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "Snap7", "Includes"));
- }
- Definitions.Add(string.Format("WITH_SNAP7_BINDING={0}", isLibrarySupported ? 1 : 0));
- return isLibrarySupported;
- }
- public TestPLC(TargetInfo Target)
- {
- PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
- LoadSnap7(Target);
- }
- }
Add Comment
Please, Sign In to add comment