Skip to content
Permalink
Browse files

[Build] Fix RuntimeIdentifiers detection for graphics API mode

  • Loading branch information
xen2 committed Jan 9, 2019
1 parent d6711de commit f25b105a0765c30dcf277a6dfec749b466a8cff7
Showing with 10 additions and 8 deletions.
  1. +10 −8 sources/targets/Xenko.GlobalSettings.targets
@@ -25,13 +25,13 @@
<!-- Include platform dependent assembly when specified -->
<PropertyGroup Condition="'$(XenkoGraphicsApiDependent)' == 'true' And '$(XenkoGraphicsApiDependentBuildAll)' != 'true'">
<RuntimeIdentifiers></RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Windows' And ('$(XenkoGraphicsApi)' == 'Direct3D11' Or '$(XenkoGraphicsApi)' == '')">$(RuntimeIdentifiers);win-d3d11</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Windows' And '$(XenkoGraphicsApi)' == 'Direct3D12'">$(RuntimeIdentifiers);win-d3d12</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Windows' And '$(XenkoGraphicsApi)' == 'OpenGL'">$(RuntimeIdentifiers);win-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Windows' And '$(XenkoGraphicsApi)' == 'OpenGLES'">$(RuntimeIdentifiers);win-opengles</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Windows' And '$(XenkoGraphicsApi)' == 'Vulkan'">$(RuntimeIdentifiers);win-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Linux' And ('$(XenkoGraphicsApi)' == 'OpenGL' Or '$(XenkoGraphicsApi)' == '')">$(RuntimeIdentifiers);linux-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(XenkoPlatform)' == 'Linux' And '$(XenkoGraphicsApi)' == 'Vulkan'">$(RuntimeIdentifiers);linux-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And ('$(XenkoGraphicsApi)' == 'Direct3D11' Or '$(XenkoGraphicsApi)' == '')">$(RuntimeIdentifiers);win-d3d11</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And '$(XenkoGraphicsApi)' == 'Direct3D12'">$(RuntimeIdentifiers);win-d3d12</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And '$(XenkoGraphicsApi)' == 'OpenGL'">$(RuntimeIdentifiers);win-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And '$(XenkoGraphicsApi)' == 'OpenGLES'">$(RuntimeIdentifiers);win-opengles</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Windows;')) And ($(TargetFramework.StartsWith('net4')) Or '$(TargetFramework)' == 'netstandard2.0') And '$(XenkoGraphicsApi)' == 'Vulkan'">$(RuntimeIdentifiers);win-vulkan</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Linux;')) And '$(TargetFramework)' == 'netstandard2.0' And ('$(XenkoGraphicsApi)' == 'OpenGL' Or '$(XenkoGraphicsApi)' == '')">$(RuntimeIdentifiers);linux-opengl</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$(_XenkoPlatforms.Contains(';Linux;')) And '$(TargetFramework)' == 'netstandard2.0' And '$(XenkoGraphicsApi)' == 'Vulkan'">$(RuntimeIdentifiers);linux-vulkan</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition="'$(XenkoGraphicsApiDependent)' == 'true' And '$(XenkoGraphicsApiDependentBuildAll)' == 'true'">
<!-- Cross-compilation (multiple platforms at once) -->
@@ -44,7 +44,9 @@
</PropertyGroup>
<PropertyGroup Condition="'$(XenkoGraphicsApiDependent)' == 'true'">
<RuntimeIdentifiers>$([MSBuild]::Unescape($(RuntimeIdentifiers.Trim(';'))))</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(RuntimeIdentifiers)' == ''">any</RuntimeIdentifiers>
<!-- Default fallbacks -->
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'netstandard2.0' And '$(RuntimeIdentifiers)' == ''">win-d3d11</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' != 'netstandard2.0' And '$(RuntimeIdentifiers)' == ''">any</RuntimeIdentifiers>
<RuntimeIdentifierDefault Condition="'$(RuntimeIdentifiers)' != ''">$(RuntimeIdentifiers.Split(';')[0])</RuntimeIdentifierDefault>

<ExtrasBuildEachRuntimeIdentifier Condition="'$(RuntimeIdentifiers)' != ''">true</ExtrasBuildEachRuntimeIdentifier>

0 comments on commit f25b105

Please sign in to comment.
You can’t perform that action at this time.