move submodules to vendor folder for easier management
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cd SDL
|
||||
cd vendor/SDL
|
||||
cmake -S . -B build
|
||||
cmake --build build
|
||||
cd ../SDL_image
|
||||
|
||||
@@ -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
0
SDL → vendor/SDL
vendored
0
SDL_image → vendor/SDL_image
vendored
0
SDL_image → vendor/SDL_image
vendored
Reference in New Issue
Block a user