From d6bc5557fe704629c003e5e6da54fe89c2d72a70 Mon Sep 17 00:00:00 2001 From: Joshua Benuck Date: Fri, 6 Dec 2019 21:19:46 -0800 Subject: [PATCH] Fix error building on Windows w/ 2019 Build Tools. --- sdl2-sys/build.rs | 1 + sdl2-sys/patches/SDL2-2.0.9-CMakeLists.txt.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sdl2-sys/patches/SDL2-2.0.9-CMakeLists.txt.patch diff --git a/sdl2-sys/build.rs b/sdl2-sys/build.rs index 25be7610509..5884563b829 100644 --- a/sdl2-sys/build.rs +++ b/sdl2-sys/build.rs @@ -126,6 +126,7 @@ fn patch_sdl2(sdl2_source_path: &Path) { let patches: Vec<(&str, &'static str)> = vec![ // No patches at this time. If needed, add them like this: // ("SDL-2.x.y-filename.patch", include_str!("patches/SDL-2.x.y-filename.patch")), + ("SDL2-2.0.9-CMakeLists.txt.patch", include_str!("patches/SDL2-2.0.9-CMakeLists.txt.patch")), ]; let sdl_version = format!("SDL2-{}", LASTEST_SDL2_VERSION); diff --git a/sdl2-sys/patches/SDL2-2.0.9-CMakeLists.txt.patch b/sdl2-sys/patches/SDL2-2.0.9-CMakeLists.txt.patch new file mode 100644 index 00000000000..2ec9f524b10 --- /dev/null +++ b/sdl2-sys/patches/SDL2-2.0.9-CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2018-10-31 08:07:22.000000000 -0700 ++++ CMakeLists.txt 2019-12-04 21:50:07.606700200 -0800 +@@ -1292,7 +1292,7 @@ + endif() + + # Libraries for Win32 native and MinGW +- list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32) ++ list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32 vcruntime) + + # TODO: in configure.in the check for timers is set on + # cygwin | mingw32* - does this include mingw32CE?