-
Notifications
You must be signed in to change notification settings - Fork 27
/
ShaderGraphContentTask.targets
87 lines (70 loc) · 3.79 KB
/
ShaderGraphContentTask.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<!--
Justin Stenning - 2013-06-10: Modified to support C# projects
Original file: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import
Project=".\ShaderGraphContentTask.props" />
<ItemGroup>
<AvailableItemName Include="ShaderGraphContentTask">
<Targets>_ShaderGraphContentTask</Targets>
</AvailableItemName>
</ItemGroup>
<UsingTask Condition="'$(VSInstallRoot)'!=''" TaskName="Microsoft.VisualStudio.Graphics.Api.ShaderGraphContentTask" AssemblyFile="$(VSInstallRoot)\Common7\IDE\Extensions\Microsoft\VsGraphics\Microsoft.VisualStudio.Graphics.Api.dll" />
<UsingTask Condition="'$(VSInstallRoot)'==''" TaskName="Microsoft.VisualStudio.Graphics.Api.ShaderGraphContentTask" AssemblyFile="$(MSBuildBinPath)\..\..\..\Common7\IDE\Extensions\Microsoft\VsGraphics\Microsoft.VisualStudio.Graphics.Api.dll" />
<PropertyGroup>
<BuildDependsOn>$(BuildDependsOn);MakeDirsForShaderGraphContentTask</BuildDependsOn>
</PropertyGroup>
<!-- Makes the the directories that the task uses -->
<Target Name="MakeDirsForShaderGraphContentTask">
<ItemGroup Condition="'@(ShaderGraphContentTask)'!=''">
<ShaderGraphContentOutputs Include="@(ShaderGraphContentTask->Metadata('ContentOutput')->Distinct())">
<DeploymentContent>True</DeploymentContent>
</ShaderGraphContentOutputs>
<ShaderGraphContentTaskDirsToMake Include="@(ShaderGraphContentTask->DirectoryName())" />
<ShaderGraphContentOutputs>
<Link Condition="'%(ShaderGraphContentOutputs.DeploymentContent)'=='True'">$([MSBuild]::MakeRelative($(TargetDir), %(FullPath)))</Link>
</ShaderGraphContentOutputs>
<None Include="@(ShaderGraphContentOutputs);" />
</ItemGroup>
<MakeDir Directories="@(ShaderGraphContentTaskDirsToMake)" />
<ItemGroup>
<ShaderGraphContentTaskDirsToMake Remove="@(ShaderGraphContentTaskDirsToMake)" />
</ItemGroup>
</Target>
<!-- Inject a custom target into Clean by extending CleanDependsOn -->
<PropertyGroup>
<CleanDependsOn>
$(CleanDependsOn);
CustomAfterClean
</CleanDependsOn>
</PropertyGroup>
<!-- Clean the generated output files -->
<Target Name="CustomAfterClean" DependsOnTargets="MakeDirsForShaderGraphContentTask">
<Delete Files="%(ShaderGraphContentTask.ContentOutput)" />
</Target>
<Target
Name="_ShaderGraphContentTask"
BeforeTargets="$(ShaderGraphContentTaskBeforeTargets)"
AfterTargets="$(ShaderGraphContentTaskAfterTargets)"
Condition="'@(ShaderGraphContentTask)' != ''"
DependsOnTargets="MakeDirsForShaderGraphContentTask">
<Message
Importance="High"
Text="%(ShaderGraphContentTask.Identity)" />
<ShaderGraphContentTask
Condition = "'@(ShaderGraphContentTask)' != '' and '%(ShaderGraphContentTask.ExcludedFromBuild)'!='true' and '$(VisualStudioVersion)' == '12.0'"
Source = "%(ShaderGraphContentTask.Identity)"
ContentOutput = "%(ShaderGraphContentTask.ContentOutput)"
TLogDir = "$(ProjectDir)obj\$(ConfigurationName)"
IsDebugBuild = "$(UseDebugLibraries)"
/>
<ShaderGraphContentTask
Condition = "'@(ShaderGraphContentTask)' != '' and '%(ShaderGraphContentTask.ExcludedFromBuild)'!='true' and '$(VisualStudioVersion)' == '11.0'"
Source = "%(ShaderGraphContentTask.Identity)"
ContentOutput = "%(ShaderGraphContentTask.ContentOutput)"
IntermediateDir = "$(ProjectDir)obj\$(ConfigurationName)"
/>
</Target>
</Project>