This commit is contained in:
Richard Smith 2024-10-15 20:29:41 +01:00
parent 7e2da775ae
commit 10692d5168
2 changed files with 53 additions and 136 deletions

View file

@ -168,17 +168,20 @@ def build_unix():
extra_link_args = [get_the_lib_path() + '/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa',
'-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework',
'CoreVideo']
if USE_SDL2:
extra_link_args += ['/usr/local/lib/libSDL2.a']
libraries = []
extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"]
else: #platform.system() == "Linux":
print("BUILDING FOR LINUX")
extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL',
'-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
if USE_SDL2:
extra_link_args += ['-lSDL2']
extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"]
libraries = [] # Not sure why but we put them in extra_link_args instead so *shouldnt* be needed here
if USE_SDL2:
extra_link_args += ['-lSDL2']
print("extra_link_args: "+str(extra_link_args))
print("extra_compile_args: "+str(extra_compile_args))
print("libraries: "+str(libraries))