8000 Merge pull request #78 from archie2x/77-pkg-config-flags · sDos280/raylib-python-cffi@3a6deb2 · GitHub < 8000 /head>
[go: up one dir, main page]

Skip to content

Commit 3a6deb2

Browse files
Merge pull request electronstudio#78 from archie2x/77-pkg-config-flags
electronstudio#77 use all link flags from pkg-config
2 parents 1caab39 + 3a79196 commit 3a6deb2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

raylib/build.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def get_the_lib_path():
4141
return subprocess.run(['pkg-config', '--variable=libdir', 'raylib'], text=True,
4242
stdout=subprocess.PIPE).stdout.strip()
4343

44+
def get_lib_flags():
45+
return subprocess.run(['pkg-config', '--libs', 'raylib'], text=True,
46+
stdout=subprocess.PIPE).stdout.strip().split()
4447

4548
def pre_process_header(filename, remove_function_bodies=False):
4649
print("Pre-processing " + filename)
@@ -154,7 +157,7 @@ def build_unix():
154157
libraries = []
155158
else: #platform.system() == "Linux":
156159
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',
158161
'-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
159162
libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic']
160163

@@ -200,4 +203,4 @@ def build_windows():
200203

201204

202205
if __name__ == "__main__":
203-
ffibuilder.compile(verbose=True)
206+
ffibuilder.compile(verbose=True)

0 commit comments

Comments
 (0)
0