-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.targets
50 lines (41 loc) · 2.22 KB
/
Directory.Build.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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="RemoveSupportDirectories" BeforeTargets="Clean">
<RemoveDir Directories="$(OutputPath)lib" />
<RemoveDir Directories="$(OutputPath)shaders" />
</Target>
<Target Name="SetPaths" AfterTargets="Build" BeforeTargets="CopyVeldridSpirvNative">
<PropertyGroup>
<UsingMacAppBundle>false</UsingMacAppBundle>
<UsingMacAppBundle Condition="$(BuildOS) == 'macOS' AND $(OutputAppPath) != ''">true</UsingMacAppBundle>
<NeatenizePath>$(OutputPath)</NeatenizePath>
<NeatenizePath Condition="$(UsingMacAppBundle) AND $(MacBundleMono) == false">$(OutputAppPath)\Contents\MonoBundle\</NeatenizePath>
</PropertyGroup>
</Target>
<Target Name="CopyVeldridSpirvNative" AfterTargets="SetPaths" BeforeTargets="Cleanup" Condition="$(OutputType) != 'library'">
<Copy
SourceFiles="$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))veldrid.spirv\$(VeldridSpirvVersion)\runtimes\$(RuntimeID)\native\$(VeldridSpirvNativeName)"
DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="Cleanup" AfterTargets="SetPaths" Condition="$(Configuration.Contains('Release'))">
<ItemGroup>
<_DelItems3 Include="$(OutputPath)*.xml" />
</ItemGroup>
<ItemGroup>
<_DelItems4 Include="$(OutputPath)*.pdb" />
</ItemGroup>
<Delete Files="@(_DelItems3)" />
<Delete Files="@(_DelItems4)" />
</Target>
<Target Name="CopyShaders" AfterTargets="Cleanup" Condition="$(OutputType) != 'library'">
<ItemGroup>
<Shaders Include="$(TopLevelDirectory)..\DesignLibs_GPL\Eto\shaders\**\*" />
</ItemGroup>
<Copy Condition="$(OutputAppPath) != ''" SourceFiles="@(Shaders)" DestinationFolder="$(OutputAppPath)\Contents\Resources\shaders\%(Shaders.RecursiveDir)" />
<Copy Condition="$(OutputAppPath) == ''" SourceFiles="@(Shaders)" DestinationFolder="$(OutputPath)\shaders\%(Shaders.RecursiveDir)" />
</Target>
<Target Name="DisplayMessages" BeforeTargets="Build">
<Message Importance="High" Text="Project Name = $(MSBuildProjectName)" />
<Message Text="Project File Name = $(MSBuildProjectFile)" />
<Message Text="Project Extension = $(MSBuildProjectExtension)" />
</Target>
</Project>