Skip to content

Commit 79fb570

Browse files
add libffi include path for nixos
1 parent cd488d9 commit 79fb570

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

raylib/build.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
# e.g.: /usr/local/include/GLFW
4242
# PHYSAC_INCLUDE_PATH: Directory to find physac.h
4343
# e.g.: /usr/local/include
44+
# LIBFFI_INCLUDE_PATH:
45+
# e.g.: /usr/local/include
4446

4547
RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
4648

@@ -185,6 +187,10 @@ def build_unix():
185187
#include "physac.h"
186188
"""
187189

190+
libffi_include_path = os.getenv("LIBFFI_INCLUDE_PATH")
191+
if libffi_include_path is None:
192+
libffi_include_path = get_the_include_path_from_pkgconfig()
193+
188194
ffibuilder.cdef(pre_process_header(raylib_h))
189195
ffibuilder.cdef(pre_process_header(rlgl_h))
190196
ffibuilder.cdef(pre_process_header(raymath_h, True))
@@ -237,7 +243,8 @@ def build_unix():
237243
ffibuilder.set_source("raylib._raylib_cffi",
238244
ffi_includes,
239245
py_limited_api=False,
240-
include_dirs=[get_the_include_path_from_pkgconfig()],
246+
include_dirs=[raylib_include_path, raygui_include_path, physac_include_path, glfw_include_path,
247+
libffi_include_path],
241248
extra_link_args=extra_link_args,
242249
extra_compile_args=extra_compile_args,
243250
libraries=libraries)

0 commit comments

Comments
 (0)