From 9cdf40115519b6e652d413f6c3fb3b7f209d8db1 Mon Sep 17 00:00:00 2001 From: Srayan Jana Date: Fri, 19 Sep 2025 21:26:39 -0700 Subject: [PATCH] clone directory in lakefile itself --- lakefile.lean | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lakefile.lean b/lakefile.lean index 6fc1b7d..dff7d8f 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -5,10 +5,10 @@ package LeanDoomed -- we can clone directly from main, I'm sure this is fine :) def sdlGitRepo : String := "https://github.com/libsdl-org/SDL.git" -def sdlRepoDir : FilePath := "vendor/SDL" +def sdlRepoDir : String := "vendor/SDL" def sdlImageGitRepo : String := "https://github.com/libsdl-org/SDL_image.git" -def sdlImageRepoDir : FilePath := "vendor/SDL_image" +def sdlImageRepoDir : String := "vendor/SDL_image" input_file sdl.c where path := "c" / "sdl.c" @@ -23,8 +23,8 @@ target sdl.o pkg : FilePath := do buildO oFile srcJob #[] #["-fPIC", s!"-I{sdlInclude}", s!"-I{sdlImageInclude}", "-D_REENTRANT", s!"-I{leanInclude}"] "cc" target libleansdl pkg : FilePath := do - let _ ← IO.Process.run { cmd := "git", args := #["clone", "--depth", "1", "--recursive", sdlGitRepo, "vendor/SDL"] } - let _ ← IO.Process.run { cmd := "git", args := #["clone", "--depth", "1", "--recursive", sdlImageGitRepo, "vendor/SDL_image"] } + let _ ← IO.Process.run { cmd := "git", args := #["clone", "--depth", "1", "--recursive", sdlGitRepo, sdlRepoDir] } + let _ ← IO.Process.run { cmd := "git", args := #["clone", "--depth", "1", "--recursive", sdlImageGitRepo, sdlImageRepoDir] } let sdlO ← sdl.o.fetch let name := nameToStaticLib "leansdl" -- manually copy the DLLs we need to .lake/build/bin/ for the game to work