Skip to content

Commit c1e3fa2

Browse files
add libffi include path for nixos
1 parent f6b6942 commit c1e3fa2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

raylib/build.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
# e.g.: /usr/local/include/GLFW
3737
# PHYSAC_INCLUDE_PATH: Directory to find physac.h
3838
# e.g.: /usr/local/include
39+
# LIBFFI_INCLUDE_PATH:
40+
# e.g.: /usr/local/include
3941

4042
RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
4143

@@ -176,6 +178,10 @@ def build_unix():
176178
#include "physac.h"
177179
"""
178180

181+
libffi_include_path = os.getenv("LIBFFI_INCLUDE_PATH")
182+
if libffi_include_path is None:
183+
libffi_include_path = get_the_include_path_from_pkgconfig()
184+
179185
ffibuilder.cdef(pre_process_header(raylib_h))
180186
ffibuilder.cdef(pre_process_header(rlgl_h))
181187
ffibuilder.cdef(pre_process_header(raymath_h, True))
@@ -228,7 +234,8 @@ def build_unix():
228234
ffibuilder.set_source("raylib._raylib_cffi",
229235
ffi_includes,
230236
py_limited_api=False,
231-
include_dirs=[get_the_include_path_from_pkgconfig()],
237+
include_dirs=[raylib_include_path, raygui_include_path, physac_include_path, glfw_include_path,
238+
libffi_include_path],
232239
extra_link_args=extra_link_args,
233240
extra_compile_args=extra_compile_args,
234241
libraries=libraries)

0 commit comments

Comments
 (0)