Skip to content
Snippets Groups Projects
Commit 56c0f205 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Dynamically check if DTrackPlugin is actually there.

parent dd157d6c
No related branches found
No related tags found
1 merge request!32Update RWTHVRToolkit.uplugin with optional dependencies to SB, DTrack,...
...@@ -47,18 +47,15 @@ ...@@ -47,18 +47,15 @@
"Plugins": [ "Plugins": [
{ {
"Name": "nDisplay", "Name": "nDisplay",
"Enabled": true, "Enabled": true
"Optional": true
}, },
{ {
"Name": "LiveLink", "Name": "LiveLink",
"Enabled": true, "Enabled": true
"Optional": true
}, },
{ {
"Name": "LiveLinkOvernDisplay", "Name": "LiveLinkOvernDisplay",
"Enabled": true, "Enabled": true
"Optional": true
}, },
{ {
"Name": "DTrackPlugin", "Name": "DTrackPlugin",
... ...
......
...@@ -20,17 +20,35 @@ public class RWTHVRCluster : ModuleRules ...@@ -20,17 +20,35 @@ public class RWTHVRCluster : ModuleRules
"Core", "Core",
"CoreUObject", "CoreUObject",
"Engine", "Engine",
"RWTHVRToolkit",
"DisplayCluster",
"DeveloperSettings", "DeveloperSettings",
"InputCore", "InputCore",
"UMG", "UMG",
"Slate", "Slate",
"SlateCore", "SlateCore",
"RWTHVRToolkit"
}
);
if (IsPluginEnabledForTarget("nDisplay", base.Target))
{
PublicDependencyModuleNames.AddRange(
new string[]
{
"DisplayCluster"
}
);
}
if (IsPluginEnabledForTarget("DTrackPlugin", base.Target))
{
PublicDependencyModuleNames.AddRange(
new string[]
{
"DTrackPlugin", "DTrackPlugin",
"DTrackInput" "DTrackInput"
} }
); );
}
PrivateDependencyModuleNames.AddRange( PrivateDependencyModuleNames.AddRange(
new string[]{} new string[]{}
...@@ -40,4 +58,11 @@ public class RWTHVRCluster : ModuleRules ...@@ -40,4 +58,11 @@ public class RWTHVRCluster : ModuleRules
new string[] { } new string[] { }
); );
} }
private static bool IsPluginEnabledForTarget(string PluginName, ReadOnlyTargetRules Target)
{
var PL = Plugins.GetPlugin(PluginName);
return PL != null && Target.ProjectFile != null && Plugins.IsPluginEnabledForTarget(PL,
ProjectDescriptor.FromFile(Target.ProjectFile), Target.Platform, Target.Configuration, Target.Type);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment