forked from rlabrecque/Steamworks.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Steamworks.NET-Standalone.net40.targets
83 lines (77 loc) · 5.58 KB
/
Steamworks.NET-Standalone.net40.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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- if ShouldIncludeNativeSteamworks == False then don't include the native Steamworks -->
<PropertyGroup>
<ShouldIncludeNativeSteamworks Condition=" '$(ShouldIncludeNativeSteamworks)' == '' ">True</ShouldIncludeNativeSteamworks>
</PropertyGroup>
<!-- get the preferred architecture -->
<PropertyGroup>
<!-- handle x86/x64 specifically -->
<PreferredNativeSteamworks Condition=" '$(PreferredNativeSteamworks)' == '' and ( '$(PlatformTarget)' == 'x64' or '$(PlatformTarget)' == 'x86' ) ">$(PlatformTarget)</PreferredNativeSteamworks>
<!-- handle Any CPU, considering Prefer32Bit -->
<PreferredNativeSteamworks Condition=" '$(PreferredNativeSteamworks)' == '' and '$(Prefer32Bit)' == 'False' ">x64</PreferredNativeSteamworks>
<PreferredNativeSteamworks Condition=" '$(PreferredNativeSteamworks)' == '' and '$(Prefer32Bit)' == 'True' ">x86</PreferredNativeSteamworks>
<!-- fall back to x64 on 64-bit machines -->
<PreferredNativeSteamworks Condition=" '$(PreferredNativeSteamworks)' == '' and $([System.Environment]::Is64BitOperatingSystem) ">x64</PreferredNativeSteamworks>
<!-- fall back to x86 -->
<PreferredNativeSteamworks Condition=" '$(PreferredNativeSteamworks)' == '' ">x86</PreferredNativeSteamworks>
<SteamworksEnding Condition=" '$(PreferredNativeSteamworks)' == 'x64' ">64</SteamworksEnding>
<SteamworksEnding Condition=" '$(PreferredNativeSteamworks)' == 'x86' "></SteamworksEnding>
</PropertyGroup>
<!-- get the preferred paths -->
<PropertyGroup>
<SteamAppIDPath>$(MSBuildThisFileDirectory)..\steam_appid.txt</SteamAppIDPath>
<PreferredWindowsNativeSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(PreferredNativeSteamworks)\native\steam_api$(SteamworksEnding).dll</PreferredWindowsNativeSteamworksPath>
<PreferredOSXNativeSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\osx\native\libsteam_api.dylib</PreferredOSXNativeSteamworksPath>
<PreferredLinuxNativeSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\linux-$(PreferredNativeSteamworks)\native\libsteam_api.so</PreferredLinuxNativeSteamworksPath>
<PreferredWindowsSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(PreferredNativeSteamworks)\lib\net40\Steamworks.NET.dll</PreferredWindowsSteamworksPath>
<PreferredOSXSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\osx\lib\net40\Steamworks.NET.dll</PreferredOSXSteamworksPath>
<PreferredLinuxSteamworksPath>$(MSBuildThisFileDirectory)..\..\runtimes\linux-$(PreferredNativeSteamworks)\lib\net40\Steamworks.NET.dll</PreferredLinuxSteamworksPath>
</PropertyGroup>
<ItemGroup Condition=" '$(ShouldIncludeNativeSteamworks)' != 'False' ">
<None Include="$(PreferredWindowsNativeSteamworksPath)" Condition=" Exists('$(PreferredWindowsNativeSteamworksPath)') AND '$(OS)' == 'Windows_NT' ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredWindowsNativeSteamworksPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(PreferredOSXNativeSteamworksPath)" Condition=" Exists('$(PreferredOSXNativeSteamworksPath)') AND '$(OS)' == 'Unix' AND !Exists('/Library/Frameworks') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredOSXNativeSteamworksPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(PreferredLinuxNativeSteamworksPath)" Condition=" Exists('$(PreferredLinuxNativeSteamworksPath)') AND '$(OS)' == 'Unix' AND Exists('/Library/Frameworks') ">
<Link>$([System.IO.Path]::GetFilename('$(PreferredLinuxNativeSteamworksPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>
<ItemGroup>
<!--
<Reference Include="Steamworks.NET" Condition="'$(OS)' == 'Windows_NT'">
<HintPath>$(PreferredWindowsSteamworksPath)</HintPath>
</Reference>
<Reference Include="Steamworks.NET" Condition="'$(OS)' == 'Unix' AND !Exists('/Library/Frameworks')">
<HintPath>$(PreferredLinuxSteamworksPath)</HintPath>
</Reference>
<Reference Include="Steamworks.NET" Condition="'$(OS)' == 'Unix' AND Exists('/Library/Frameworks')">
<HintPath>$(PreferredOSXSteamworksPath)</HintPath>
</Reference>
-->
<Reference Include="$([System.IO.Path]::GetFullPath('$(PreferredWindowsSteamworksPath)'))" Condition="'$(OS)' == 'Windows_NT'">
<Name>Steamworks.NET</Name>
</Reference>
<Reference Include="$([System.IO.Path]::GetFullPath('$(PreferredLinuxSteamworksPath)'))" Condition="'$(OS)' == 'Unix' AND !Exists('/Library/Frameworks')">
<Name>Steamworks.NET</Name>
</Reference>
<Reference Include="$([System.IO.Path]::GetFullPath('$(PreferredOSXSteamworksPath)'))" Condition="'$(OS)' == 'Unix' AND Exists('/Library/Frameworks')">
<Name>Steamworks.NET</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="$(SteamAppIDPath)" Condition=" Exists('$(SteamAppIDPath)') ">
<Link>$([System.IO.Path]::GetFilename('$(SteamAppIDPath)'))</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>
</Project>