move submodules to vendor folder for easier management

This commit is contained in:
ValorZard
2025-08-29 11:00:07 -07:00
parent 348ae6071d
commit 33a2cd2ad1
5 changed files with 7 additions and 6 deletions

4
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "SDL"]
path = SDL
path = vendor/SDL
url = https://github.com/libsdl-org/SDL.git
[submodule "SDL_image"]
path = SDL_image
path = vendor/SDL_image
url = https://github.com/libsdl-org/SDL_image.git

View File

@@ -1,4 +1,4 @@
cd SDL
cd vendor/SDL
cmake -S . -B build
cmake --build build
cd ../SDL_image

View File

@@ -11,8 +11,8 @@ target sdl.o pkg : FilePath := do
let srcJob sdl.c.fetch
let oFile := pkg.buildDir / "c" / "sdl.o"
let leanInclude := (<- getLeanIncludeDir).toString
let sdlInclude := "SDL/include/"
let sdlImageInclude := "SDL_image/include/"
let sdlInclude := "vendor/SDL/include/"
let sdlImageInclude := "vendor/SDL_image/include/"
buildO oFile srcJob #[] #["-fPIC", s!"-I{sdlInclude}", s!"-I{sdlImageInclude}", "-D_REENTRANT", s!"-I{leanInclude}", s!"-I{sdlInclude}", s!"-I{sdlImageInclude}"] "cc"
target libleansdl pkg : FilePath := do
@@ -29,4 +29,5 @@ lean_lib Engine
@[default_target]
lean_exe LeanDoomed where
root := `Main
moreLinkArgs := #["SDL/build/libSDL3.so", "SDL_image/build/libSDL3_image.so", "-Wl,--allow-shlib-undefined", "-Wl,-rpath=SDL/build/", "-Wl,-rpath=SDL_image/build/"]
-- we have to add the rpath to tell the compiler where all of the libraries are
moreLinkArgs := #["vendor/SDL/build/libSDL3.so", "vendor/SDL_image/build/libSDL3_image.so", "-Wl,--allow-shlib-undefined", "-Wl,-rpath=vendor/SDL/build/", "-Wl,-rpath=vendor/SDL_image/build/"]

0
SDL → vendor/SDL vendored
View File

View File