-
Notifications
You must be signed in to change notification settings - Fork 0
/
os.props
29 lines (26 loc) · 1.25 KB
/
os.props
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
<Project>
<!--So we can get what OS we are building for on compiling-->
<PropertyGroup>
<IsWindows>false</IsWindows>
<IsOSX>false</IsOSX>
<IsLinux>false</IsLinux>
</PropertyGroup>
<PropertyGroup>
<IsWindows Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(RuntimeIdentifier), 'win*'))">true</IsWindows>
<IsOSX Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(RuntimeIdentifier), 'osx*'))">true</IsOSX>
<IsLinux Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(RuntimeIdentifier), 'linux*'))">true</IsLinux>
<IsAny Condition="'$(IsWindows)'=='false' And '$(IsOSX)'=='false' And '$(IsLinux)'=='false'">true</IsAny>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>Windows</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>macOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsAny)'=='true'">
<DefineConstants>Any</DefineConstants>
</PropertyGroup>
</Project>