Skip to content

Commit 5afd9b0

Browse files
change mac build to expect raylib installed in /usr/local/lib
1 parent bb4be12 commit 5afd9b0

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
cd raylib-c
4141
cd src
4242
make -j2
43+
sudo cp libraylib.a /usr/local/lib/libraylib.a
4344
- name: Build raylib-python-cffi
4445
run: |
4546
python -m pip install --upgrade pip

BUILDING.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,13 @@ Raylib.
200200

201201
git clone --recurse-submodules https://github.com/electronstudio/raylib-python-cffi
202202

203-
Build Raylib from the raylib-c directory.
203+
Build and install Raylib from the raylib-c directory.
204204

205205
::
206206

207207
cd raylib-python-cffi/raylib-c/src
208208
make
209+
sudo cp libraylib.a /usr/local/lib/libraylib.a
209210
cd ../..
210211

211212

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Problems may be caused by out of date pip:
2222

2323
Some platforms that _should_ be available: Windows 10 x64, MacOS 10.15 x64, Linux Ubuntu1804 x64.
2424

25-
If yours isn't available then pip will attempt to build from source, so you will need to have Raylib development libs installed.
25+
If yours isn't available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
26+
using homebrew, apt, etc.
2627

2728
[If it doesn't work, build from source](BUILDING.md)
2829

raylib/static/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def build_mac():
5555
"""
5656
#include "../../raylib/raylib.h" // the C header of the library, supplied by us here
5757
""",
58-
extra_link_args=['raylib-c/src/libraylib.a', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'],
58+
extra_link_args=['-lraylib', '-framework', 'OpenGL', '-framework', 'Cocoa', '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'],
5959
)
6060

6161
if __name__ == "__main__":

0 commit comments

Comments
 (0)