/
Common.PropertyGroups.targets.t4
61 lines (59 loc) · 2.11 KB
/
Common.PropertyGroups.targets.t4
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
<#@ template inherits="ProjectTemplateTransformation" language="C#" #>
<#
var currentPlatform = (Xenko.Core.PlatformType)Properties.CurrentPlatform;
foreach(var platform in Properties.Platforms)
{
// Skip the platform if it is not current
if (currentPlatform != platform.Type)
{
continue;
}
var projectType = (Xenko.Core.Assets.ProjectType)Properties.ProjectType;
foreach(var platformPart in platform.GetParts())
{
// If this is an alias, just skip it as it is only used in the solution
if (platformPart.Alias != null)
{
continue;
}
// Filter project types
if (!platformPart.IsProjectHandled(projectType))
continue;
var platformName = platformPart.GetProjectName(projectType);
// Remap from "Any CPU" to AnyCPU, another weirdness of VS
if (platformName == "Any CPU")
{
platformName = "AnyCPU";
}
foreach(var config in platformPart.Configurations)
{
#>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == '<#= config.Name #>|<#= platformName #>' ">
<# if (config.IsDebug) { #>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<# if (platformName == "iPhone") { #>
<MtouchFastDev>True</MtouchFastDev>
<# } #>
<# } else { #>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<# } #>
<OutputPath>..\Bin\<#= platform.Name #><#= platformPart.Cpu != null ? "-" + platformPart.Cpu : string.Empty #>\<#= config.Name #>\</OutputPath>
<IntermediateOutputPath>obj\<#= platform.Name #><#= platformPart.Cpu != null ? "-" + platformPart.Cpu : string.Empty #>\<#= config.Name #>\</IntermediateOutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<# if (platformPart.Cpu != null) { #>
<PlatformTarget><#= platformPart.Cpu #></PlatformTarget>
<# } #>
<# foreach(var configLine in platform.GetConfigurationProperties(platformPart, config.Name)) { #>
<#= configLine #>
<# } #>
</PropertyGroup>
<#
}
}
}
#>