got it building on windows again

This commit is contained in:
Srayan Jana
2025-09-19 22:27:00 -07:00
parent 05553e85f1
commit 6da77e27e2
2 changed files with 5 additions and 9 deletions

View File

@@ -1,6 +0,0 @@
cd vendor/SDL
cmake -S . -B build
cmake --build build
cd ../SDL_image
cmake -S . -B build -DSDL3_DIR=../SDL/build
cmake --build build

View File

@@ -50,13 +50,13 @@ target libleansdl pkg : FilePath := do
-- Build the repos with cmake -- Build the repos with cmake
-- SDL itself needs to be built before SDL_image, as the latter depends on the former -- SDL itself needs to be built before SDL_image, as the latter depends on the former
IO.println "Building SDL" IO.println "Building SDL"
let configureSdlBuild IO.Process.output { cmd := "cmake", args := #["-S", sdlRepoDir, "-B", sdlRepoDir ++ "/build", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_BUILD_TYPE=Release"] } let configureSdlBuild IO.Process.output { cmd := "cmake", args := #["-S", sdlRepoDir, "-B", sdlRepoDir ++ "/build", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_C_COMPILER=cc"] }
if configureSdlBuild.exitCode != 0 then if configureSdlBuild.exitCode != 0 then
IO.println s!"Error configuring SDL: {configureSdlBuild.stderr}" IO.println s!"Error configuring SDL: {configureSdlBuild.stderr}"
else else
IO.println "SDL configured successfully" IO.println "SDL configured successfully"
IO.println configureSdlBuild.stdout IO.println configureSdlBuild.stdout
let buildSdl IO.Process.output { cmd := "cmake", args := #["--build", sdlRepoDir ++ "/build", "--config", "Release"] } let buildSdl IO.Process.output { cmd := "cmake", args := #["--build", sdlRepoDir ++ "/build", "--config", "Release",] }
if buildSdl.exitCode != 0 then if buildSdl.exitCode != 0 then
IO.println s!"Error building SDL: {buildSdl.exitCode}" IO.println s!"Error building SDL: {buildSdl.exitCode}"
IO.println buildSdl.stderr IO.println buildSdl.stderr
@@ -65,7 +65,9 @@ target libleansdl pkg : FilePath := do
IO.println buildSdl.stdout IO.println buildSdl.stdout
-- Build SDL_Image -- Build SDL_Image
IO.println "Building SDL_image" IO.println "Building SDL_image"
let configureSdlImageBuild IO.Process.output { cmd := "cmake", args := #["-S", sdlImageRepoDir, "-B", sdlImageRepoDir ++ "/build", s!"-DSDL3_DIR={sdlRepoDir}/build", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_BUILD_TYPE=Release"] } let currentDir IO.currentDir
let sdlConfigPath := currentDir / sdlRepoDir / "build"
let configureSdlImageBuild IO.Process.output { cmd := "cmake", args := #["-S", sdlImageRepoDir, "-B", sdlImageRepoDir ++ "/build", s!"-DSDL3_DIR={sdlConfigPath}", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_C_COMPILER=cc"] }
if configureSdlImageBuild.exitCode != 0 then if configureSdlImageBuild.exitCode != 0 then
IO.println s!"Error configuring SDL_image: {configureSdlImageBuild.stderr}" IO.println s!"Error configuring SDL_image: {configureSdlImageBuild.stderr}"
else else