diff --git a/raylib/build.py b/raylib/build.py index acb1f7d..1e30e7f 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -41,6 +41,9 @@ def get_the_lib_path(): return subprocess.run(['pkg-config', '--variable=libdir', 'raylib'], text=True, stdout=subprocess.PIPE).stdout.strip() +def get_lib_flags(): + return subprocess.run(['pkg-config', '--libs', 'raylib'], text=True, + stdout=subprocess.PIPE).stdout.strip().split() def pre_process_header(filename, remove_function_bodies=False): print("Pre-processing " + filename) @@ -154,7 +157,7 @@ def build_unix(): libraries = [] else: #platform.system() == "Linux": print("BUILDING FOR LINUX") - extra_link_args = [get_the_lib_path() + '/libraylib.a', '-lm', '-lpthread', '-lGL', + extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL', '-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic'] libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic'] @@ -200,4 +203,4 @@ else: if __name__ == "__main__": - ffibuilder.compile(verbose=True) \ No newline at end of file + ffibuilder.compile(verbose=True)