Prepare to fix linux builds
This commit is contained in:
parent
e027beba4e
commit
6c0ddc6856
1 changed files with 17 additions and 20 deletions
|
|
@ -151,9 +151,22 @@ static:
|
|||
else:
|
||||
const cmd = &"cd {srcDir.sanitizePath} && bash ./sdl2-config --libs"
|
||||
const conf = execAction(cmd).output.getLibOutput
|
||||
echo conf
|
||||
echo buildDir.unixizePath
|
||||
{.passL: &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath} {conf}".}
|
||||
{.passL: &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath} {conf} -Wl,--no-as-needed -ldl -lsndio".}
|
||||
|
||||
let pathenv = getEnv("PATH")
|
||||
when defined(windows):
|
||||
putEnv("PATH", buildDir.sanitizePath & ";" & pathenv)
|
||||
else:
|
||||
putEnv("PATH", buildDir.sanitizePath & ":" & pathenv)
|
||||
putEnv("CFLAGS", "-I" & includeDir.sanitizePath)
|
||||
putEnv("LDFLAGS", &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath} {conf} -Wl,--no-as-needed -lsndio -ldl") # & " " & buildDir/"libSDL2main.a")
|
||||
putEnv("SDL2_CONFIG", (srcDir/"sdl2-config").sanitizePath)
|
||||
putEnv("SDL_CONFIG", (srcDir/"sdl2-config").sanitizePath)
|
||||
putEnv("LIBS", &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath}")
|
||||
putEnv("SDL_CFLAGS", "-I" & includeDir.sanitizePath)
|
||||
let ldpath = getEnv("LD_LIBRARY_PATH")
|
||||
putEnv("LD_LIBRARY_PATH", &"{buildDir.sanitizePath}:{buildDir.unixizePath}:{ldpath}")
|
||||
putEnv("SDL2_PATH", srcDir.sanitizePath)
|
||||
|
||||
when defined(SDL_Static):
|
||||
cImport(srcDir/"include"/"SDL.h", recurse = true, flags = "-f=ast2 -DDOXYGEN_SHOULD_IGNORE_THIS -E__,_ -F__,_")
|
||||
|
|
@ -186,22 +199,6 @@ const SDLStaticLib* = findStaticlib()
|
|||
const SDL2ConfigPath* = srcDir / "sdl2-config"
|
||||
const SDLSrcDir* = srcDir
|
||||
|
||||
static:
|
||||
let pathenv = getEnv("PATH")
|
||||
when defined(windows):
|
||||
putEnv("PATH", buildDir.sanitizePath & ";" & pathenv)
|
||||
else:
|
||||
putEnv("PATH", buildDir.sanitizePath & ":" & pathenv)
|
||||
echo pathenv
|
||||
echo includeDir
|
||||
putEnv("CFLAGS", "-I" & includeDir.sanitizePath)
|
||||
putEnv("LDFLAGS", &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath}") # & " " & buildDir/"libSDL2main.a")
|
||||
putEnv("SDL2_CONFIG", (srcDir/"sdl2-config").sanitizePath)
|
||||
putEnv("LIBS", &"-L{buildDir.sanitizePath} -L{buildDir.unixizePath}")
|
||||
putEnv("SDL_CFLAGS", "-I" & includeDir.sanitizePath)
|
||||
putEnv("LD_LIBRARY_PATH", &"{buildDir.sanitizePath}:{buildDir.unixizePath}")
|
||||
putEnv("SDL2_PATH", srcDir.sanitizePath)
|
||||
|
||||
const
|
||||
WINDOWPOS_UNDEFINED* = WINDOWPOS_UNDEFINED_DISPLAY(0)
|
||||
WINDOWPOS_CENTERED* = WINDOWPOS_CENTERED_DISPLAY(0)
|
||||
|
|
@ -212,4 +209,4 @@ const
|
|||
BUTTON_MMASK* = sdl_button(BUTTON_MIDDLE)
|
||||
BUTTON_RMASK* = sdl_button(BUTTON_RIGHT)
|
||||
BUTTON_X1MASK* = sdl_button(BUTTON_X1)
|
||||
BUTTON_X2MASK* = sdl_button(BUTTON_X2)
|
||||
BUTTON_X2MASK* = sdl_button(BUTTON_X2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue