@@ -41,6 +41,9 @@ def get_the_lib_path():
41
41
return subprocess .run (['pkg-config' , '--variable=libdir' , 'raylib' ], text = True ,
42
42
stdout = subprocess .PIPE ).stdout .strip ()
43
43
44
+ def get_lib_flags ():
45
+ return subprocess .run (['pkg-config' , '--libs' , 'raylib' ], text = True ,
46
+ stdout = subprocess .PIPE ).stdout .strip ().split ()
44
47
45
48
def pre_process_header (filename , remove_function_bodies = False ):
46
49
print ("Pre-processing " + filename )
@@ -154,7 +157,7 @@ def build_unix():
154
157
libraries = []
155
158
else : #platform.system() == "Linux":
156
159
print ("BUILDING FOR LINUX" )
157
- extra_link_args = [ get_the_lib_path () + '/libraylib.a' , '-lm' , '-lpthread' , '-lGL' ,
160
+ extra_link_args = get_lib_flags () + [ '-lm' , '-lpthread' , '-lGL' ,
158
161
'-lrt' , '-lm' , '-ldl' , '-lX11' , '-lpthread' , '-latomic' ]
159
162
libraries = ['GL' , 'm' , 'pthread' , 'dl' , 'rt' , 'X11' , 'atomic' ]
160
163
@@ -200,4 +203,4 @@ def build_windows():
200
203
201
204
202
205
if __name__ == "__main__" :
203
- ffibuilder .compile (verbose = True )
206
+ ffibuilder .compile (verbose = True )
0 commit comments