at 25.11-pre 2.7 kB view raw
1diff --git a/raylib/build.py b/raylib/build.py 2index 81fa11a..943c34e 100644 3--- a/raylib/build.py 4+++ b/raylib/build.py 5@@ -33,8 +33,8 @@ def check_raylib_installed(): 6 def check_SDL_installed(): 7 return subprocess.run(['pkg-config', '--exists', 'sdl2'], text=True, stdout=subprocess.PIPE).returncode == 0 8 9-def get_the_include_path(): 10- return subprocess.run(['pkg-config', '--variable=includedir', 'raylib'], text=True, 11+def get_the_include_path(libname): 12+ return subprocess.run(['pkg-config', '--variable=includedir', libname], text=True, 13 stdout=subprocess.PIPE).stdout.strip() 14 15 16@@ -110,9 +110,9 @@ def build_unix(): 17 if RAYLIB_PLATFORM=="SDL" and not check_SDL_installed(): 18 raise Exception("ERROR: SDL2 not found by pkg-config. Please install pkg-config and SDL2.") 19 20- raylib_h = get_the_include_path() + "/raylib.h" 21- rlgl_h = get_the_include_path() + "/rlgl.h" 22- raymath_h = get_the_include_path() + "/raymath.h" 23+ raylib_h = get_the_include_path("raylib") + "/raylib.h" 24+ rlgl_h = get_the_include_path("raylib") + "/rlgl.h" 25+ raymath_h = get_the_include_path("raylib") + "/raymath.h" 26 27 if not os.path.isfile(raylib_h): 28 raise Exception("ERROR: " + raylib_h + " not found. Please install Raylib.") 29@@ -129,13 +129,13 @@ def build_unix(): 30 #include "raymath.h" 31 """ 32 33- glfw3_h = get_the_include_path() + "/GLFW/glfw3.h" 34+ glfw3_h = get_the_include_path("glfw3") + "/GLFW/glfw3.h" 35 if RAYLIB_PLATFORM=="Desktop" and check_header_exists(glfw3_h): 36 ffi_includes += """ 37 #include "GLFW/glfw3.h" 38 """ 39 40- raygui_h = get_the_include_path() + "/raygui.h" 41+ raygui_h = get_the_include_path("raygui") + "/raygui.h" 42 if check_header_exists(raygui_h): 43 ffi_includes += """ 44 #define RAYGUI_IMPLEMENTATION 45@@ -143,7 +143,7 @@ def build_unix(): 46 #include "raygui.h" 47 """ 48 49- physac_h = get_the_include_path() + "/physac.h" 50+ physac_h = get_the_include_path("physac") + "/physac.h" 51 if check_header_exists(physac_h): 52 ffi_includes += """ 53 #define PHYSAC_IMPLEMENTATION 54@@ -192,7 +192,7 @@ def build_unix(): 55 ffibuilder.set_source("raylib._raylib_cffi", 56 ffi_includes, 57 py_limited_api=False, 58- include_dirs=[get_the_include_path()], 59+ include_dirs=[get_the_include_path("libffi")], 60 extra_link_args=extra_link_args, 61 extra_compile_args=extra_compile_args, 62 libraries=libraries)