From dcea5f47c3a4e225c1cd62e5a274352fccda23f1 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 24 Oct 2024 19:34:51 +0900 Subject: [PATCH] Hack around missing process.h on Unix systems Co-authored-by: Susko3 --- SDL3-CS/generate_bindings.py | 6 ++++++ SDL3-CS/include/process.h | 1 + 2 files changed, 7 insertions(+) create mode 100644 SDL3-CS/include/process.h diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index 317f020..d855256 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -24,6 +24,7 @@ Example: import json import pathlib +import platform import re import subprocess import sys @@ -362,6 +363,11 @@ def should_skip(solo_headers: list[Header], header: Header): def main(): solo_headers = [make_header_fuzzy(header_name) for header_name in sys.argv[1:]] + if platform.system() != "Windows": + base_command.extend([ + "--include-directory", csproj_root / "include" + ]) + prepare_sdl_source() sdl_api = get_sdl_api_dump() diff --git a/SDL3-CS/include/process.h b/SDL3-CS/include/process.h new file mode 100644 index 0000000..9791d02 --- /dev/null +++ b/SDL3-CS/include/process.h @@ -0,0 +1 @@ +// dummy process.h when building for SDL_PLATFORM_WINDOWS on non-windows systems