Repository navigation
Expand file tree
/
Copy pathAfter.targets
More file actions
49 lines (44 loc) · 2.03 KB
/
Copy pathAfter.targets
File metadata and controls
49 lines (44 loc) · 2.03 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<When Condition=" '$(OutputType)' == 'Library' ">
<ItemGroup>
<StageItem Include="$(TargetPath)" />
<StageItem Include="$(DocumentationFile)" />
</ItemGroup>
</When>
<When Condition=" '$(OutputType)' == 'Exe' or '$(OutputType)' == 'WinExe' ">
<ItemGroup>
<StageItem Include="$(TargetPath)" />
<StageItem Include="$(TargetPath).config" Condition=" Exists('$(TargetPath).config') " />
</ItemGroup>
</When>
</Choose>
<PropertyGroup>
<MainStageDir>$(StageDir)</MainStageDir>
<MainStageDir Condition=" '$(StoreInDLLs)' == 'true' ">$(StageDir)\DLLs</MainStageDir>
<PlatformStageDir>$(StageDir)\Platforms\$(ReferencedPlatform)</PlatformStageDir>
<UnsignedItems>@(StageItem->'$(OutputPath)\%(Filename)%(Extension)')</UnsignedItems>
<UnsignedPlatformStaged>@(StageItem->'$(PlatformStageDir)\%(Filename)%(Extension)')</UnsignedPlatformStaged>
<UnsignedMainStaged>@(StageItem->'$(MainStageDir)\%(Filename)%(Extension)')</UnsignedMainStaged>
</PropertyGroup>
<Target Name="_PlatformStage"
DependsOnTargets="CoreBuild"
Inputs="$(UnsignedItems)"
Outputs="$(UnsignedPlatformStaged)">
<Copy SourceFiles="$(UnsignedItems)" DestinationFolder="$(PlatformStageDir)" />
</Target>
<Target Name="_MainStage"
DependsOnTargets="CoreBuild"
Inputs="$(UnsignedItems)"
Outputs="$(UnsignedMainStaged)"
Condition=" '$(ReferencedPlatform)' == '$(MainPlatform)' ">
<Copy SourceFiles="$(UnsignedItems)" DestinationFolder="$(MainStageDir)" />
</Target>
<Target Name="Stage"
DependsOnTargets="_MainStage;_PlatformStage"
Condition=" '$(Staging)' == 'true' ">
<Error Text="StageDir is not set." Condition=" '$(StageDir)' == '' " />
<Error Text="MainPlatform is not set." Condition=" '$(MainPlatform)' == '' " />
</Target>
</Project>