separate mac linux builds
This commit is contained in:
parent
c019d59298
commit
f40f6aff04
5 changed files with 50 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
__version__ = "2.5.dev1"
|
||||
__version__ = "2.5.dev2"
|
||||
|
||||
from ._raylib_cffi import ffi, lib as rl
|
||||
from _raylib_cffi.lib import *
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Linux build assumes raylib, GL, etc are all already installed as system libraries. We dont distribute them.
|
||||
|
||||
from cffi import FFI
|
||||
import os
|
||||
import platform
|
||||
|
@ -18,11 +20,7 @@ ffibuilder.set_source("_raylib_cffi",
|
|||
libraries=['raylib','GL','m','pthread', 'dl', 'rt', 'X11']
|
||||
)
|
||||
|
||||
# Hack to produce static linked lib
|
||||
command = "clang -bundle -undefined dynamic_lookup ./_raylib_cffi.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib libraylib.a -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo -o ./_raylib_cffi.cpython-37m-darwin.so"
|
||||
|
||||
if __name__ == "__main__":
|
||||
ffibuilder.compile(verbose=True)
|
||||
if platform.system()=="Darwin":
|
||||
print(command)
|
||||
os.system(command)
|
||||
|
||||
|
|
23
raylib/build_mac.py
Normal file
23
raylib/build_mac.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
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" // the C header of the library
|
||||
"""
|
||||
)
|
||||
|
||||
# Hack to produce static linked lib
|
||||
command = "clang -bundle -undefined dynamic_lookup ./_raylib_cffi.o -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/sqlite/lib libraylib.a -F/System/Library/Frameworks -framework OpenGL -framework Cocoa -framework IOKit -framework CoreFoundation -framework CoreVideo -o ./_raylib_cffi.cpython-37m-darwin.so"
|
||||
|
||||
if __name__ == "__main__":
|
||||
ffibuilder.compile(verbose=True)
|
||||
if platform.system()=="Darwin":
|
||||
print(command)
|
||||
os.system(command)
|
Reference in a new issue