Reset git tree before generate/build

This commit is contained in:
Dan Balasescu 2024-09-18 17:55:45 +09:00
parent e207e72b6a
commit a035dd9f99
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

1
External/build.sh vendored
View File

@ -87,6 +87,7 @@ fi
# Build SDL
pushd SDL >/dev/null
git reset --hard HEAD
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
cmake --build build/ --config Release
$SUDO cmake --install build/ --prefix install_output --config Release

View File

@ -130,7 +130,14 @@ headers = [
add("SDL3/SDL_vulkan.h"),
]
def patch_sdl_types():
def prepare_sdl_source():
subprocess.run([
"git",
"reset",
"--hard",
"HEAD"
], cwd = SDL_root)
subprocess.run([
"git",
"apply",
@ -298,7 +305,7 @@ def get_string_returning_functions(sdl_api):
def main():
patch_sdl_types()
prepare_sdl_source()
sdl_api = get_sdl_api_dump()