File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Examples/HelloCompute
1818Frameworks /
1919Makefile
2020Makefile.in
21+ ObjectivelyGPU.vs15 /libs /
2122aclocal.m4
2223autom4te.cache /
2324build /
Original file line number Diff line number Diff line change 6969 <PropertyGroup >
7070 <OutDir >bin\$(Platform)$(Configuration)\</OutDir >
7171 <IntDir >tmp\$(ProjectName)\$(Platform)$(Configuration)\</IntDir >
72- <!-- SDL3 headers come from ObjectivelyMVC's bundled libs (repos are checked out side-by-side) -->
73- <IncludePath >Sources\;..\Sources\;..\..\Objectively\Sources\;..\..\Objectively\Objectively.vs15\Sources\;..\..\ObjectivelyMVC\ObjectivelyMVC.vs15\libs\sdl\; $(IncludePath)</IncludePath >
74- <LibraryPath >..\..\Objectively\Objectively.vs15\bin\$(Platform)$(Configuration)\;..\..\ObjectivelyMVC\ObjectivelyMVC.vs15\libs\sdl\lib\$(Platform)\; $(LibraryPath)</LibraryPath >
72+ <!-- SDL3 search paths are provided by sdl3.targets, which downloads SDL3 on demand. -->
73+ <IncludePath >Sources\;..\Sources\;..\..\Objectively\Sources\;..\..\Objectively\Objectively.vs15\Sources\;$(IncludePath)</IncludePath >
74+ <LibraryPath >..\..\Objectively\Objectively.vs15\bin\$(Platform)$(Configuration)\;$(LibraryPath)</LibraryPath >
7575 <UseMultiToolTask >true</UseMultiToolTask >
7676 </PropertyGroup >
7777 <ItemDefinitionGroup >
108108 </Link >
109109 </ItemDefinitionGroup >
110110 <Import Project =" $(VCTargetsPath)\Microsoft.Cpp.targets" />
111+ <Import Project =" sdl3.targets" />
111112 <ImportGroup Label =" ExtensionTargets" >
112113 </ImportGroup >
113114</Project >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+
4+ <!--
5+ Fetches the official SDL3 VC development libraries from libsdl.org and wires
6+ them into the compiler and linker search paths. This mirrors what CI does,
7+ so local developers and CI share a single code path: the libraries are
8+ downloaded once, on demand, and cached under libs/ (which is .gitignored).
9+ Bump SDL3Version to upgrade; delete libs/ to force a re-download.
10+ -->
11+ <PropertyGroup >
12+ <SDL3Version >3.4.2</SDL3Version >
13+ <SDL3Dir >$(MSBuildThisFileDirectory)libs\SDL3-$(SDL3Version)\</SDL3Dir >
14+ <SDL3LibArch Condition =" '$(Platform)' == 'Win32'" >x86</SDL3LibArch >
15+ <SDL3LibArch Condition =" '$(SDL3LibArch)' == ''" >x64</SDL3LibArch >
16+ </PropertyGroup >
17+
18+ <PropertyGroup >
19+ <IncludePath >$(SDL3Dir)include\;$(IncludePath)</IncludePath >
20+ <LibraryPath >$(SDL3Dir)lib\$(SDL3LibArch)\;$(LibraryPath)</LibraryPath >
21+ </PropertyGroup >
22+
23+ <Target Name =" DownloadSDL3"
24+ BeforeTargets =" ClCompile"
25+ Condition =" !Exists('$(SDL3Dir)include\SDL3\SDL.h')" >
26+ <Message Importance =" high" Text =" Downloading SDL3 $(SDL3Version) development libraries..." />
27+ <Exec WorkingDirectory =" $(MSBuildThisFileDirectory)"
28+ Command =" powershell -NoProfile -ExecutionPolicy Bypass -Command " $ErrorActionPreference = 'Stop'; New-Item -ItemType Directory -Force libs | Out-Null; Invoke-WebRequest -Uri 'https://github.com/libsdl-org/SDL/releases/download/release-$(SDL3Version)/SDL3-devel-$(SDL3Version)-VC.zip' -OutFile 'libs\sdl3.zip'; Expand-Archive -Force 'libs\sdl3.zip' 'libs'; Remove-Item 'libs\sdl3.zip'" " />
29+ </Target >
30+
31+ </Project >
You can’t perform that action at this time.
0 commit comments