Skip to content

Commit fbe4a03

Browse files
committed
SDL: fix windows build
1 parent f906dfd commit fbe4a03

File tree

7 files changed

+48
-0
lines changed

7 files changed

+48
-0
lines changed

src/xrGameSpy/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="sdl2" version="2.0.5" targetFramework="native" />
4+
<package id="sdl2.redist" version="2.0.5" targetFramework="native" />
5+
</packages>

src/xrGameSpy/xrGameSpy.vcxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,19 @@
188188
<Project>{7885cf3c-ee04-4c67-9467-1fbf9a36b037}</Project>
189189
</ProjectReference>
190190
</ItemGroup>
191+
<ItemGroup>
192+
<None Include="packages.config" />
193+
</ItemGroup>
191194
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
192195
<ImportGroup Label="ExtensionTargets">
196+
<Import Project="..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets" Condition="Exists('..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" />
197+
<Import Project="..\packages\sdl2.2.0.5\build\native\sdl2.targets" Condition="Exists('..\packages\sdl2.2.0.5\build\native\sdl2.targets')" />
193198
</ImportGroup>
199+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
200+
<PropertyGroup>
201+
<ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
202+
</PropertyGroup>
203+
<Error Condition="!Exists('..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets'))" />
204+
<Error Condition="!Exists('..\packages\sdl2.2.0.5\build\native\sdl2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.2.0.5\build\native\sdl2.targets'))" />
205+
</Target>
194206
</Project>

src/xrGameSpy/xrGameSpy.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,10 @@
9696
<Filter>Wrapper</Filter>
9797
</ClInclude>
9898
</ItemGroup>
99+
<ItemGroup>
100+
<Natvis Include="..\TypeHelper.natvis" />
101+
</ItemGroup>
102+
<ItemGroup>
103+
<None Include="packages.config" />
104+
</ItemGroup>
99105
</Project>

src/xrNetServer/NET_Client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include "xrGameSpy/xrGameSpy_MainDefs.h"
1010

11+
#include "SDL.h"
12+
1113
#pragma warning(push)
1214
#pragma warning(disable : 4995)
1315
#include <malloc.h>

src/xrNetServer/packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="sdl2" version="2.0.5" targetFramework="native" />
4+
<package id="sdl2.redist" version="2.0.5" targetFramework="native" />
5+
</packages>

src/xrNetServer/xrNetServer.vcxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,24 @@
183183
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project>
184184
</ProjectReference>
185185
</ItemGroup>
186+
<ItemGroup>
187+
<None Include="packages.config" />
188+
</ItemGroup>
186189
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
187190
<ImportGroup Label="ExtensionTargets">
191+
<Import Project="..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets" Condition="Exists('..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" />
192+
<Import Project="..\packages\sdl2.2.0.5\build\native\sdl2.targets" Condition="Exists('..\packages\sdl2.2.0.5\build\native\sdl2.targets')" />
188193
</ImportGroup>
189194
<ProjectExtensions>
190195
<VisualStudio>
191196
<UserProperties DevPartner_IsInstrumented="1" />
192197
</VisualStudio>
193198
</ProjectExtensions>
199+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
200+
<PropertyGroup>
201+
<ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
202+
</PropertyGroup>
203+
<Error Condition="!Exists('..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets'))" />
204+
<Error Condition="!Exists('..\packages\sdl2.2.0.5\build\native\sdl2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.2.0.5\build\native\sdl2.targets'))" />
205+
</Target>
194206
</Project>

src/xrNetServer/xrNetServer.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@
2323
<ClInclude Include="NET_Shared.h" />
2424
<ClInclude Include="stdafx.h" />
2525
</ItemGroup>
26+
<ItemGroup>
27+
<Natvis Include="..\TypeHelper.natvis" />
28+
</ItemGroup>
29+
<ItemGroup>
30+
<None Include="packages.config" />
31+
</ItemGroup>
2632
</Project>

0 commit comments

Comments
 (0)