/
Xenko.GlobalSettings.targets
173 lines (147 loc) · 9.58 KB
/
Xenko.GlobalSettings.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!-- Global settings used to configure the XenkoGraphicsApi -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Default values -->
<PropertyGroup>
<!-- Defaults for CPU and GraphicsApi based on platform-->
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'Windows'">Direct3D11</XenkoDefaultGraphicsApi>
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'UWP'">Direct3D11</XenkoDefaultGraphicsApi>
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'Android'">OpenGLES</XenkoDefaultGraphicsApi>
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'iOS'">OpenGLES</XenkoDefaultGraphicsApi>
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'Linux'">OpenGL</XenkoDefaultGraphicsApi>
<XenkoDefaultGraphicsApi Condition="'$(XenkoPlatform)' == 'macOS'">OpenGL</XenkoDefaultGraphicsApi>
<XenkoGraphicsApi Condition="'$(XenkoGraphicsApi)' == '' and '$(XenkoDefaultGraphicsApi)' != ''">$(XenkoDefaultGraphicsApi)</XenkoGraphicsApi>
<XenkoAssemblyProcessorOptions Condition="'$(XenkoAssemblyProcessorOptions)' == ''">$(XenkoAssemblyProcessorDefaultOptions)</XenkoAssemblyProcessorOptions>
</PropertyGroup>
<PropertyGroup>
<XenkoDependenciesDir Condition="'$(XenkoDependenciesDir)' != '' and !HasTrailingSlash('$(XenkoDependenciesDir)')">$(XenkoDependenciesDir)\</XenkoDependenciesDir>
<XenkoDependenciesDir Condition="'$(XenkoDependenciesDir)' == ''">$(XenkoPackageXenko)\deps\</XenkoDependenciesDir>
</PropertyGroup>
<!--Import global Xenko settings-->
<Import Project="$(MSBuildThisFileDirectory)..\targets\Xenko.Core.GlobalSettings.targets"/>
<!-- Include platform dependent assembly when specified -->
<PropertyGroup Condition="'$(XenkoGraphicsApiDependent)' == 'true'">
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'net45'">win7-d3d11;win7-d3d12;win7-opengl;win7-opengles;win7-vulkan</RuntimeIdentifiers>
<RuntimeIdentifierDefault Condition="'$(TargetFramework)' == 'net45'">win7-d3d11</RuntimeIdentifierDefault>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0'">linux-opengl;linux-vulkan</RuntimeIdentifiers>
<RuntimeIdentifierDefault Condition="'$(TargetFramework)' == 'netstandard2.0'">linux-opengl</RuntimeIdentifierDefault>
<ExtrasBuildEachRuntimeIdentifier Condition="'$(RuntimeIdentifiers)' != ''">true</ExtrasBuildEachRuntimeIdentifier>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' And '$(RuntimeIdentifierDefault)' != ''">$(RuntimeIdentifierDefault)</RuntimeIdentifier>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win7-d3d11'">Direct3D11</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win7-d3d12'">Direct3D12</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win7-opengl'">OpenGL</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win7-opengles'">OpenGLES</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'win7-vulkan'">Vulkan</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'linux-opengl'">OpenGL</XenkoGraphicsApi>
<XenkoGraphicsApi Condition="'$(RuntimeIdentifier)' == 'linux-vulkan'">Vulkan</XenkoGraphicsApi>
</PropertyGroup>
<!-- Use default runtime as ref assembly -->
<PropertyGroup Condition="'$(RuntimeIdentifierDefault)' != '' And '$(RuntimeIdentifier)' == '$(RuntimeIdentifierDefault)'">
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);XenkoIncludeRefAssemblies</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
<Target Name="XenkoIncludeRefAssemblies">
<ItemGroup>
<TfmSpecificPackageFile Include="@(IntermediateAssembly)" PackagePath="ref/$(TargetFramework)" />
</ItemGroup>
</Target>
<!--
Settings XenkoGraphicsApi specific
-->
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'Direct3D11' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_DIRECT3D;XENKO_GRAPHICS_API_DIRECT3D11</XenkoGraphicsApiDefines>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'Direct3D12' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_DIRECT3D;XENKO_GRAPHICS_API_DIRECT3D12</XenkoGraphicsApiDefines>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'Null' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_NULL</XenkoGraphicsApiDefines>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'OpenGL' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_OPENGL;XENKO_GRAPHICS_API_OPENGLCORE</XenkoGraphicsApiDefines>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'OpenGLES' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_OPENGL;XENKO_GRAPHICS_API_OPENGLES</XenkoGraphicsApiDefines>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoGraphicsApi)' == 'Vulkan' ">
<XenkoGraphicsApiDefines>XENKO_GRAPHICS_API_VULKAN</XenkoGraphicsApiDefines>
</PropertyGroup>
<!--
Settings XenkoPlatform specific
-->
<PropertyGroup Condition=" '$(XenkoPlatform)' == 'Windows' ">
<XenkoGraphicsApiDefines>FRAMEWORK_SHADER_USE_SHARPDX;$(XenkoGraphicsApiDefines)</XenkoGraphicsApiDefines>
<FrameworkShaderUseSharpDX>true</FrameworkShaderUseSharpDX>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoPlatform)' == 'UWP' ">
<AutoIncludeSystemAssembly>true</AutoIncludeSystemAssembly>
<ProjectLockFile Condition="'$(ProjectLockFile)' == ''">$(MSBuildThisFileDirectory)..\build\project.lock.json</ProjectLockFile>
</PropertyGroup>
<PropertyGroup Condition="('$(XenkoPlatform)' == 'Linux') or ('$(XenkoPlatform)' == 'macOS')">
<FrameworkShaderUseSharpDX>false</FrameworkShaderUseSharpDX>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoPlatform)' == 'Android' ">
<XenkoExternalSuffix>.Android</XenkoExternalSuffix>
<FrameworkShaderUseSharpDX>false</FrameworkShaderUseSharpDX>
<AndroidSupportedAbis>armeabi-v7a%3barmeabi%3bx86</AndroidSupportedAbis>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoPlatform)' == 'iOS' ">
<XenkoExternalSuffix>.iOS</XenkoExternalSuffix>
<FrameworkShaderUseSharpDX>false</FrameworkShaderUseSharpDX>
<NUnitLiteBinDir>$(XenkoDependenciesDir)NUnitLite\net-monotouch\</NUnitLiteBinDir>
</PropertyGroup>
<!--
Global Defines
-->
<PropertyGroup>
<XenkoGraphicsApiDefines>$(XenkoGraphicsApiDefines);XENKO_EFFECT_COMPILER</XenkoGraphicsApiDefines>
<XenkoEffectCompiler>true</XenkoEffectCompiler>
</PropertyGroup>
<PropertyGroup Condition=" '$(XenkoNETRuntime)' == 'CoreCLR' ">
<XenkoNETRuntimeDefines>XENKO_RUNTIME_CORECLR</XenkoNETRuntimeDefines>
<AutoIncludeSystemAssembly>true</AutoIncludeSystemAssembly>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);$(XenkoGraphicsApiDefines);XENKO_SUPPORT_BETA_UPGRADE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<XenkoUI Condition="'$(XenkoUI)' == '' AND '$(XenkoPlatform)' == 'Windows'">SDL;WINFORMS;WPF</XenkoUI>
<XenkoUI Condition="'$(XenkoUI)' == '' AND '$(XenkoPlatform)' == 'Linux' AND '$(XenkoGraphicsApi)' == 'Vulkan'">SDL</XenkoUI>
<XenkoUI Condition="'$(XenkoUI)' == '' AND '$(XenkoPlatform)' == 'Linux' AND '$(XenkoGraphicsApi)' == 'OpenGL'">SDL;OPENTK</XenkoUI>
<DefineConstants Condition="$(XenkoUI.Contains('SDL'))">$(DefineConstants);XENKO_UI_SDL</DefineConstants>
<DefineConstants Condition="$(XenkoUI.Contains('OPENTK'))">$(DefineConstants);XENKO_UI_OPENTK</DefineConstants>
<DefineConstants Condition="$(XenkoUI.Contains('WINFORMS'))">$(DefineConstants);XENKO_UI_WINFORMS</DefineConstants>
<DefineConstants Condition="$(XenkoUI.Contains('WPF'))">$(DefineConstants);XENKO_UI_WPF</DefineConstants>
</PropertyGroup>
<!-- Build the XenkoUIList using the value of XenkoUI -->
<ItemGroup Condition="'$(XenkoUIList)' == ''">
<XenkoUIList Condition="'$(XenkoUI)' != ''" Include="$(XenkoUI)" />
<XenkoUIList Condition="'$(XenkoUI)' == ''" Include="None" />
</ItemGroup>
<!--Building Xenko SDK itself?-->
<PropertyGroup Condition=" '$(XenkoUserBuild)' != 'true' ">
<!--Output All files in solution\Bin directory-->
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- Pack target -->
<!--<UsingTask TaskName="Xenko.Core.Tasks.PackAssets" AssemblyFile="$(MSBuildThisFileDirectory)..\core\Xenko.Core.Tasks\bin\$(Configuration)\net472\Xenko.Core.Tasks.exe" />-->
<Target Name="PrepareXenkoAssetsForPack" BeforeTargets="_GetPackageFiles" Condition="'$(XenkoPackAssets)' == 'true'">
<!-- We use exec version rather than task version, otherwise file will be locked during rebuild -->
<!--<PackAssets ProjectFile="$(MSBuildProjectFile)" IntermediatePackagePath="$(IntermediateOutputPath)\xenko">
<Output TaskParameter="GeneratedItems" ItemName="None"/>
</PackAssets>-->
<Exec Command=""$(MSBuildThisFileDirectory)..\core\Xenko.Core.Tasks\bin\$(Configuration)\net472\Xenko.Core.Tasks.exe" pack-assets "$(MSBuildProjectFile)" "$(IntermediateOutputPath)\xenko"" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" ItemName="PackAssetsLine" />
</Exec>
<ItemGroup>
<PackAssetsLine Update="@(PackAssetsLine)">
<SourcePath>$([System.String]::new('%(Identity)').Split('|')[0])</SourcePath>
<PackagePath>$([System.String]::new('%(Identity)').Split('|')[1])</PackagePath>
</PackAssetsLine>
<None Include="%(PackAssetsLine.SourcePath)">
<Pack>true</Pack>
<PackagePath>%(PackAssetsLine.PackagePath)</PackagePath>
</None>
</ItemGroup>
</Target>
</Project>