This repository has been archived by the owner on Aug 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
CUE.NET.targets
150 lines (130 loc) · 5.72 KB
/
CUE.NET.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!--
* Build targets hacked from SQLite (thanks!)
* System.Data.SQLite.Core.targets -
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
******************************************************************************
** Build Items **
******************************************************************************
-->
<ItemGroup>
<CueNETSDKFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
Include="$(MSBuildThisFileDirectory)libs\**\*.dll" />
<AdditionalPublishFilex86 Include="$(MSBuildThisFileDirectory)libs\x86\*.dll">
<Visible>False</Visible>
</AdditionalPublishFilex86>
<AdditionalPublishFilex64 Include="$(MSBuildThisFileDirectory)libs\x64\*.dll">
<Visible>False</Visible>
</AdditionalPublishFilex64>
</ItemGroup>
<!--
******************************************************************************
** Content Items **
******************************************************************************
-->
<ItemGroup Condition="'$(ContentCueNETSDKFiles)' != '' And
'$(ContentCueNETSDKFiles)' != 'false' And
'@(CueNETSDKFiles)' != ''">
<Content Include="@(CueNETSDKFiles)">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!--
******************************************************************************
** Build Targets* **
******************************************************************************
-->
<Target Name="CopyCueNETSDKFiles"
Condition="'$(CopyCueNETSDKFiles)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')"
Inputs="@(CueNETSDKFiles)"
Outputs="@(CueNETSDKFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">
<!--
NOTE: Copy "CUESDK*.dll" and all related files, for every
architecture that we support, to the build output directory.
-->
<Message Text="Copying SDK files..." Importance="high" />
<Copy SourceFiles="@(CueNETSDKFiles)"
DestinationFiles="@(CueNETSDKFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<!--
******************************************************************************
-->
<Target Name="CleanCueNETSDKFiles"
Condition="'$(CleanCueNETSDKFiles)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')">
<!--
NOTE: Delete "CUESDK*.dll" and all related files, for every
architecture that we support, from the build output directory.
-->
<Message Text="this file $(MSBuildThisFileDirectory)" Importance="high"/>
<Message Text="Cleaning SDK files..." Importance="high" />
<Delete Files="@(CueNETSDKFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<!--
******************************************************************************
-->
<Target Name="CollectCueNETSDKFiles"
Condition="'$(CollectCueNETSDKFiles)' != 'false'">
<Message Text="Collecting SDK files..." Importance="high" />
<ItemGroup>
<FilesForPackagingFromProject Include="@(CueNETSDKFiles)">
<DestinationRelativePath>bin\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<!--
******************************************************************************
-->
<Target Name="BeforePublish">
<Touch Files="@(IntermediateAssembly)" />
</Target>
<Target Name="BeforeBuild">
<CreateItem Include="@(AdditionalPublishFilex86)" AdditionalMetadata="TargetPath=x86\%(FileName)%(Extension);IsDataFile=false">
<Output TaskParameter="Include" ItemName="_DeploymentManifestFiles" />
</CreateItem>
<CreateItem Include="@(AdditionalPublishFilex64)" AdditionalMetadata="TargetPath=x64\%(FileName)%(Extension);IsDataFile=false">
<Output TaskParameter="Include" ItemName="_DeploymentManifestFiles" />
</CreateItem>
</Target>
<!--
******************************************************************************
** Build Properties **
******************************************************************************
-->
<PropertyGroup>
<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
CopyCueNETSDKFiles;
</PostBuildEventDependsOn>
<BuildDependsOn>
$(BuildDependsOn);
CopyCueNETSDKFiles;
</BuildDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
CleanCueNETSDKFiles;
</CleanDependsOn>
</PropertyGroup>
<!--
******************************************************************************
** Publish Properties for Visual Studio 201x **
******************************************************************************
-->
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' Or
'$(VisualStudioVersion)' == '10.0' Or
'$(VisualStudioVersion)' == '11.0' Or
'$(VisualStudioVersion)' == '12.0'">
<PipelineCollectFilesPhaseDependsOn>
CollectCueNETSDKFiles;
$(PipelineCollectFilesPhaseDependsOn);
</PipelineCollectFilesPhaseDependsOn>
</PropertyGroup>
</Project>