|
25 | 25 | import subprocess |
26 | 26 | import time |
27 | 27 |
|
28 | | -RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop") |
| 28 | +RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "") |
| 29 | +RAYLIB_INCLUDE_PATH = os.getenv("RAYLIB_INCLUDE_PATH", "") |
| 30 | +RAYLIB_LIB_PATH = os.getenv("RAYLIB_LIB_PATH", "") |
29 | 31 |
|
30 | 32 | def check_raylib_installed(): |
31 | | - return subprocess.run(['pkg-config', '--exists', 'raylib'], text=True, stdout=subprocess.PIPE).returncode == 0 |
| 33 | + return os.path.isfile(os.path.join(RAYLIB_LIB_PATH, 'libraylib.a')) |
32 | 34 |
|
33 | 35 | def check_SDL_installed(): |
34 | 36 | return subprocess.run(['pkg-config', '--exists', 'sdl2'], text=True, stdout=subprocess.PIPE).returncode == 0 |
35 | 37 |
|
36 | 38 | def get_the_include_path(): |
37 | | - return subprocess.run(['pkg-config', '--variable=includedir', 'raylib'], text=True, |
38 | | - stdout=subprocess.PIPE).stdout.strip() |
39 | | - |
| 39 | + return RAYLIB_INCLUDE_PATH |
40 | 40 |
|
41 | 41 | def get_the_lib_path(): |
42 | | - return subprocess.run(['pkg-config', '--variable=libdir', 'raylib'], text=True, |
43 | | - stdout=subprocess.PIPE).stdout.strip() |
| 42 | + return RAYLIB_LIB_PATH |
44 | 43 |
|
45 | 44 | def get_lib_flags(): |
46 | | - return subprocess.run(['pkg-config', '--libs', 'raylib'], text=True, |
47 | | - stdout=subprocess.PIPE).stdout.strip().split() |
| 45 | + return [f'-L{RAYLIB_LIB_PATH}', '-lraylib'] |
48 | 46 |
|
49 | 47 | def pre_process_header(filename, remove_function_bodies=False): |
50 | 48 | print("Pre-processing " + filename) |
@@ -180,6 +178,9 @@ def build_unix(): |
180 | 178 | extra_link_args += ['-lX11','-lSDL2'] |
181 | 179 | elif RAYLIB_PLATFORM=="DRM": |
182 | 180 | extra_link_args += ['-lEGL', '-lgbm'] |
| 181 | + elif RAYLIB_PLATFORM=="PLATFORM_COMMA": |
| 182 | + extra_link_args.remove('-lGL') |
| 183 | + extra_link_args += ['-lGLESv2', '-lEGL', '-lwayland-client', '-lwayland-egl'] |
183 | 184 | else: |
184 | 185 | extra_link_args += ['-lX11'] |
185 | 186 | extra_compile_args = ["-Wno-incompatible-pointer-types", "-D_CFFI_NO_LIMITED_API"] |
|
0 commit comments