Patch SDL to not include gameinput.h

This commit is contained in:
hwsmm 2025-01-02 00:51:58 +09:00
parent 20e10af7aa
commit d2e30d2167
2 changed files with 16 additions and 0 deletions

6
External/build.sh vendored
View File

@ -88,6 +88,12 @@ fi
# Build SDL
pushd SDL >/dev/null
git reset --hard HEAD
if [[ $RUNNER_OS == 'Windows' ]]; then
echo "Patching SDL to not include gameinput.h"
patch -Np1 -i ../exclude-gameinput.patch
fi
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

10
External/exclude-gameinput.patch vendored Normal file
View File

@ -0,0 +1,10 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1953,6 +1953,7 @@ elseif(WINDOWS)
check_c_source_compiles("
#include <stdbool.h>
#define COBJMACROS
+ #error SDL does not build on Github Actions with GameInput
#include <gameinput.h>
int main(int argc, char **argv) { return 0; }" HAVE_GAMEINPUT_H
)