This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
raylib-python-cffi/raylib/static/build_linux.py
2020-02-14 17:33:37 +00:00

24 lines
810 B
Python

# Linux build assumes raylib, GL, etc are all already installed as system libraries. We dont distribute them.
# Raylib must be installed the compiled with: cmake -DWITH_PIC=ON -DSHARED=ON -DSTATIC=ON ..
from cffi import FFI
import os
import platform
ffibuilder = FFI()
ffibuilder.cdef(open("../raylib_modified.h").read().replace('RLAPI ', ''))
ffibuilder.set_source("_raylib_cffi",
"""
#include "../raylib.h"
""",
extra_link_args=['/usr/local/lib/libraylib.a','-lm', '-lpthread', '-lGLU', '-lGL', '-lrt', '-lm', '-ldl', '-lX11', '-lpthread'],
libraries=['GL','m','pthread', 'dl', 'rt', 'X11']
)
if __name__ == "__main__":
ffibuilder.compile(verbose=True)