fix linux/pi building
This commit is contained in:
parent
1548a40ede
commit
9bf7544ad9
2 changed files with 11 additions and 3 deletions
10
README.md
10
README.md
|
@ -76,18 +76,26 @@ and install it:
|
||||||
|
|
||||||
Build and install Raylib from the raylib-c directory.
|
Build and install Raylib from the raylib-c directory.
|
||||||
|
|
||||||
|
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||||
cd raylib-python-cffi/raylib-c
|
cd raylib-python-cffi/raylib-c
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
Optional: Build the Raylib shared libs, if you plan to use `raylib.dynamic` binding.
|
||||||
|
|
||||||
|
rm -rf *
|
||||||
cmake -DWITH_PIC=on -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DWITH_PIC=on -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release ..
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
Make a patched version of raylib header. (Not necessary if you've already got raylib_modifed.h from repo and haven't changed anything.)
|
Optional: Make a patched version of raylib header. (Not necessary if you've already got raylib_modifed.h from repo and haven't changed anything.)
|
||||||
|
|
||||||
cd ../../raylib
|
cd ../../raylib
|
||||||
cp raylib.h raylib_modified.h
|
cp raylib.h raylib_modified.h
|
||||||
patch -p0 <raylib_modified.h.patch
|
patch -p0 <raylib_modified.h.patch
|
||||||
|
|
||||||
|
|
||||||
Build
|
Build
|
||||||
|
|
||||||
pip3 install cffi
|
pip3 install cffi
|
||||||
|
|
|
@ -39,7 +39,7 @@ def build_mac():
|
||||||
ffibuilder.cdef(open("raylib/raylib_modified.h").read().replace('RLAPI ', ''))
|
ffibuilder.cdef(open("raylib/raylib_modified.h").read().replace('RLAPI ', ''))
|
||||||
ffibuilder.set_source("raylib.static._raylib_cffi",
|
ffibuilder.set_source("raylib.static._raylib_cffi",
|
||||||
"""
|
"""
|
||||||
#include "./../raylib/raylib.h" // the C header of the library, supplied by us here
|
#include "../../raylib/raylib.h" // the C header of the library, supplied by us here
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
# Hack to produce static linked lib using static librarylib.a supplied by us
|
# Hack to produce static linked lib using static librarylib.a supplied by us
|
||||||
|
@ -59,7 +59,7 @@ def build_rpi_nox():
|
||||||
ffibuilder.cdef(open("raylib/raylib_modified.h").read().replace('RLAPI ', ''))
|
ffibuilder.cdef(open("raylib/raylib_modified.h").read().replace('RLAPI ', ''))
|
||||||
ffibuilder.set_source("raylib.static._raylib_cffi",
|
ffibuilder.set_source("raylib.static._raylib_cffi",
|
||||||
"""
|
"""
|
||||||
#include "./../raylib/raylib.h"
|
#include "../../raylib/raylib.h"
|
||||||
""",
|
""",
|
||||||
extra_link_args=['/usr/local/lib/libraylib.a',
|
extra_link_args=['/usr/local/lib/libraylib.a',
|
||||||
'/opt/vc/lib/libEGL_static.a', '/opt/vc/lib/libGLESv2_static.a',
|
'/opt/vc/lib/libEGL_static.a', '/opt/vc/lib/libGLESv2_static.a',
|
||||||
|
|
Reference in a new issue