From 3a79196a958291bd990a48d33abe0183c48c8056 Mon Sep 17 00:00:00 2001 From: Roger Standridge <9526806+archie2x@users.noreply.github.com> Date: Sat, 6 Aug 2022 00:33:09 +0000 Subject: [PATCH] #77 use all link flags from pkg-config --- raylib/build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)