Move SDL2 and ImGui deps from submodules to find_package.
diff --git a/.gitmodules b/.gitmodules
index dcedcea..c6ec233 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -26,12 +26,6 @@
 [submodule "third_party/benchmark"]
 	path = third_party/benchmark
 	url = https://github.com/google/benchmark.git
-[submodule "third_party/sdl2"]
-	path = third_party/sdl2
-	url = https://github.com/SDL-mirror/SDL.git
-[submodule "third_party/dear_imgui"]
-	path = third_party/dear_imgui
-	url = https://github.com/ocornut/imgui.git
 [submodule "third_party/ruy"]
 	path = third_party/ruy
 	url = https://github.com/google/ruy
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b37f0e0..7a3729b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -431,17 +431,6 @@
   add_subdirectory(build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo EXCLUDE_FROM_ALL)
 endif()
 
-if(${IREE_BUILD_DEBUGGER} OR ${IREE_BUILD_SAMPLES})
-  # sdl2 logs are spammy - change log level while adding
-  function(include_sdl2)
-    set(CMAKE_MESSAGE_LOG_LEVEL "WARNING")
-    add_subdirectory(third_party/sdl2 EXCLUDE_FROM_ALL)
-  endfunction()
-  include_sdl2()
-
-  add_subdirectory(build_tools/third_party/dear_imgui EXCLUDE_FROM_ALL)
-endif()
-
 if(${IREE_BUILD_TESTS})
   add_subdirectory(third_party/benchmark EXCLUDE_FROM_ALL)
   enable_testing(iree)
diff --git a/SUBMODULE_VERSIONS b/SUBMODULE_VERSIONS
index d8b8ca7..80f16e0 100644
--- a/SUBMODULE_VERSIONS
+++ b/SUBMODULE_VERSIONS
@@ -1,7 +1,6 @@
 6ec136281086b71da32b5fb068bd6e46b78a5c79 third_party/abseil-cpp
 daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark
 63b254577ed77a8004a9be6ac707f3dccc4e1fd9 third_party/cpuinfo
-4c13807b7d43ff0946b7ffea0ae3aee9e611d778 third_party/dear_imgui
 4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc
 b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest
 045e2f7267c28b85984f73a362315b7396450c91 third_party/llvm-bazel
@@ -10,7 +9,6 @@
 74d7261be17cf659d5930d4830609406bd7553e3 third_party/pffft
 d8c7ee00a687ac369e62e2032514a93a9b413502 third_party/pybind11
 d79362c24fd70eab3196672273dbfd8f0dd6124c third_party/ruy
-a1390ed39ec77ecfb574bc6fcd5bfc5e3adbdea9 third_party/sdl2
 685f86471e9d26b3eb7676695a2e2cefb4551ae9 third_party/spirv_cross
 f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers
 d91f92e7fd1bcc8c1af2c25649ee58c18bef0a9a third_party/tensorflow
diff --git a/build_tools/third_party/dear_imgui/CMakeLists.txt b/build_tools/third_party/dear_imgui/CMakeLists.txt
deleted file mode 100644
index 6600566..0000000
--- a/build_tools/third_party/dear_imgui/CMakeLists.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(IMGUI_ROOT "${IREE_ROOT_DIR}/third_party/dear_imgui/")
-
-external_cc_library(
-  PACKAGE
-    dear_imgui
-  NAME
-    dear_imgui
-  ROOT
-    ${IMGUI_ROOT}
-  SRCS
-    "imgui.cpp"
-    "imgui_demo.cpp"
-    "imgui_draw.cpp"
-    "imgui_widgets.cpp"
-  HDRS
-    "imconfig.h"
-    "imgui.h"
-    "imgui_internal.h"
-    "imstb_rectpack.h"
-    "imstb_textedit.h"
-    "imstb_truetype.h"
-)
-
-external_cc_library(
-  PACKAGE
-    dear_imgui
-  NAME
-    impl_sdl
-  ROOT
-    ${IMGUI_ROOT}
-  SRCS
-    "examples/imgui_impl_sdl.cpp"
-  HDRS
-    "examples/imgui_impl_sdl.h"
-  INCLUDES
-    ${IMGUI_ROOT}
-  DEPS
-    dear_imgui::dear_imgui
-    SDL2-static
-)
-
-# Dear ImGui's Vulkan implementation requires statically link against Vulkan.
-# One way to achieve this is by installing the Vulkan SDK from
-# https://vulkan.lunarg.com/.
-# If Vulkan is not found, omit these targets (and users must do the same).
-include(FindVulkan)
-if(NOT Vulkan_FOUND)
-  message(NOTICE "Vulkan was not found, skipping Dear ImGui Vulkan support")
-else()
-  external_cc_library(
-    PACKAGE
-      dear_imgui
-    NAME
-      impl_vulkan
-    ROOT
-      ${IMGUI_ROOT}
-    SRCS
-      "examples/imgui_impl_vulkan.cpp"
-    HDRS
-      "examples/imgui_impl_vulkan.h"
-    INCLUDES
-      ${IMGUI_ROOT}
-    DEPS
-      dear_imgui::dear_imgui
-      Vulkan::Vulkan
-  )
-
-  add_executable(dear_imgui_example_sdl_vulkan
-    ${IMGUI_ROOT}/examples/example_sdl_vulkan/main.cpp
-  )
-  target_include_directories(dear_imgui_example_sdl_vulkan
-    PUBLIC
-      ${IMGUI_ROOT}/examples/
-  )
-  target_link_libraries(dear_imgui_example_sdl_vulkan
-    PRIVATE
-      dear_imgui::dear_imgui
-      dear_imgui::impl_sdl
-      dear_imgui::impl_vulkan
-  )
-endif()
diff --git a/build_tools/third_party/sdl2/SDL_config.h b/build_tools/third_party/sdl2/SDL_config.h
deleted file mode 100644
index 8b2b893..0000000
--- a/build_tools/third_party/sdl2/SDL_config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef SDL_config_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- *  \file SDL_config.h
- */
-
-/* Add any platform that doesn't build using the configure system. */
-#if defined(__WIN32__)
-#include "SDL_config_windows.h"
-#elif defined(__MACOSX__)
-#include "SDL_config_macosx.h"
-#elif defined(__IPHONEOS__)
-#include "SDL_config_iphoneos.h"
-#elif defined(__ANDROID__)
-#include "SDL_config_android.h"
-#elif defined(__LINUX__)
-#include "SDL_config_linux.h"
-#elif defined(__EMSCRIPTEN__)
-#include "SDL_config_emscripten.h"
-#else
-/* This is a minimal configuration just to get SDL running on new platforms */
-#include "SDL_config_minimal.h"
-#endif /* platform config */
-
-#ifdef USING_GENERATED_CONFIG_H
-#error Wrong SDL_config.h, check your include path?
-#endif
-
-#endif /* SDL_config_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_android.h b/build_tools/third_party/sdl2/SDL_config_android.h
deleted file mode 100644
index 8107d6c..0000000
--- a/build_tools/third_party/sdl2/SDL_config_android.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef SDL_config_android_h_
-#define SDL_config_android_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- *  \file SDL_config_android.h
- *
- *  This is a configuration that can be used to build SDL for Android
- */
-
-#include <stdarg.h>
-
-#define HAVE_GCC_ATOMICS 1
-
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_SETENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY 1
-#define HAVE_STRLCAT 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_CLOCK_GETTIME 1
-
-#define SIZEOF_VOIDP 4
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_ANDROID 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_ANDROID 1
-#define SDL_HAPTIC_ANDROID 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX 1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_ANDROID 1
-
-/* Enable OpenGL ES */
-#define SDL_VIDEO_OPENGL_ES 1
-#define SDL_VIDEO_OPENGL_ES2 1
-#define SDL_VIDEO_OPENGL_EGL 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-
-/* Enable Vulkan support */
-/* Android does not support Vulkan in native code using the "armeabi" ABI. */
-#if defined(__ARM_ARCH) && __ARM_ARCH < 7
-#define SDL_VIDEO_VULKAN 0
-#else
-#define SDL_VIDEO_VULKAN 1
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_ANDROID 1
-
-/* Enable the filesystem driver */
-#define SDL_FILESYSTEM_ANDROID 1
-
-#endif /* SDL_config_android_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_emscripten.h b/build_tools/third_party/sdl2/SDL_config_emscripten.h
deleted file mode 100644
index 53187d4..0000000
--- a/build_tools/third_party/sdl2/SDL_config_emscripten.h
+++ /dev/null
@@ -1,388 +0,0 @@
-#ifndef _SDL_config_emscripten_h
-#define _SDL_config_emscripten_h
-
-/**
- *  \file SDL_config_emscripten.h
- *
- *  This is a configuration that can be used to build SDL for Emscripten
- */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-/* Make sure that this isn't included by Visual C++ */
-#ifdef _MSC_VER
-#error You should run hg revert SDL_config.h
-#endif
-
-/* C language features */
-/* #undef const */
-/* #undef inline */
-/* #undef volatile */
-
-/* C datatypes */
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-#define HAVE_GCC_ATOMICS 1
-/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
-
-/* Comment this if you want to build without any C library requirements */
-#define HAVE_LIBC 1
-#if HAVE_LIBC
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MATH_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_WCHAR_H 1
-/* #undef HAVE_PTHREAD_NP_H */
-/* #undef HAVE_LIBUNWIND_H */
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#endif
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_WCSLEN 1
-/* #undef HAVE_WCSLCPY */
-/* #undef HAVE_WCSLCAT */
-#define HAVE_WCSCMP 1
-#define HAVE_STRLEN 1
-/* #undef HAVE_STRLCPY */
-/* #undef HAVE_STRLCAT */
-/* #undef HAVE__STRREV */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-/* #undef HAVE_INDEX */
-/* #undef HAVE_RINDEX */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* #undef HAVE_ITOA */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__UITOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-/* #undef HAVE__I64TOA */
-/* #undef HAVE__UI64TOA */
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-/* #undef HAVE__STRICMP */
-#define HAVE_STRCASECMP 1
-/* #undef HAVE__STRNICMP */
-#define HAVE_STRNCASECMP 1
-/* #undef HAVE_SSCANF */
-#define HAVE_VSSCANF 1
-/* #undef HAVE_SNPRINTF */
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI /**/
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_FOPEN64 1
-#define HAVE_FSEEKO 1
-/* #undef HAVE_FSEEKO64 */
-#define HAVE_SIGACTION 1
-#define HAVE_SA_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_SYSCTLBYNAME 1
-/* #undef HAVE_CLOCK_GETTIME */
-/* #undef HAVE_GETPAGESIZE */
-#define HAVE_MPROTECT 1
-#define HAVE_ICONV 1
-/* #undef HAVE_PTHREAD_SETNAME_NP */
-/* #undef HAVE_PTHREAD_SET_NAME_NP */
-/* #undef HAVE_SEM_TIMEDWAIT */
-/* #undef HAVE_GETAUXVAL */
-/* #undef HAVE_POLL */
-
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#define HAVE_STDINT_H 1
-#endif /* HAVE_LIBC */
-
-/* #undef HAVE_ALTIVEC_H */
-/* #undef HAVE_LIBUDEV_H */
-/* #undef HAVE_DBUS_DBUS_H */
-/* #undef HAVE_IBUS_IBUS_H */
-/* #undef HAVE_FCITX_FRONTEND_H */
-/* #undef HAVE_IMMINTRIN_H */
-/* #undef HAVE_LIBSAMPLERATE_H */
-
-/* #undef HAVE_DDRAW_H */
-/* #undef HAVE_DINPUT_H */
-/* #undef HAVE_DSOUND_H */
-/* #undef HAVE_DXGI_H */
-/* #undef HAVE_XINPUT_H */
-/* #undef HAVE_XINPUT_GAMEPAD_EX */
-/* #undef HAVE_XINPUT_STATE_EX */
-
-/* SDL internal assertion support */
-/* #undef SDL_DEFAULT_ASSERT_LEVEL */
-
-/* Allow disabling of core subsystems */
-#define SDL_ATOMIC_DISABLED 1
-/* #undef SDL_AUDIO_DISABLED */
-#define SDL_CPUINFO_DISABLED 1
-/* #undef SDL_EVENTS_DISABLED */
-/* #undef SDL_FILE_DISABLED */
-/* #undef SDL_JOYSTICK_DISABLED */
-#define SDL_HAPTIC_DISABLED 1
-#define SDL_LOADSO_DISABLED 1
-/* #undef SDL_RENDER_DISABLED */
-#define SDL_THREADS_DISABLED 1
-/* #undef SDL_TIMERS_DISABLED */
-/* #undef SDL_VIDEO_DISABLED */
-/* #undef SDL_POWER_DISABLED */
-/* #undef SDL_FILESYSTEM_DISABLED */
-
-/* Enable various audio drivers */
-/* #undef SDL_AUDIO_DRIVER_ALSA */
-/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_ARTS */
-/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
-#define SDL_AUDIO_DRIVER_DISK 1
-/* #undef SDL_AUDIO_DRIVER_DSOUND */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1
-/* #undef SDL_AUDIO_DRIVER_ESD */
-/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_HAIKU */
-/* #undef SDL_AUDIO_DRIVER_JACK */
-/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NACL */
-/* #undef SDL_AUDIO_DRIVER_NAS */
-/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NETBSD */
-/* #undef SDL_AUDIO_DRIVER_OSS 1 */
-/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
-/* #undef SDL_AUDIO_DRIVER_PAUDIO */
-/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
-/* #undef SDL_AUDIO_DRIVER_QSA */
-/* #undef SDL_AUDIO_DRIVER_SNDIO */
-/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
-/* #undef SDL_AUDIO_DRIVER_WASAPI */
-/* #undef SDL_AUDIO_DRIVER_WINMM */
-
-/* Enable various input drivers */
-/* #undef SDL_INPUT_LINUXEV */
-/* #undef SDL_INPUT_LINUXKD */
-/* #undef SDL_INPUT_TSLIB */
-/* #undef SDL_JOYSTICK_HAIKU */
-/* #undef SDL_JOYSTICK_DINPUT */
-/* #undef SDL_JOYSTICK_XINPUT */
-/* #undef SDL_JOYSTICK_DUMMY */
-/* #undef SDL_JOYSTICK_IOKIT */
-/* #undef SDL_JOYSTICK_LINUX */
-/* #undef SDL_JOYSTICK_ANDROID */
-/* #undef SDL_JOYSTICK_WINMM */
-/* #undef SDL_JOYSTICK_USBHID */
-/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
-#define SDL_JOYSTICK_EMSCRIPTEN 1
-/* #undef SDL_HAPTIC_DUMMY */
-/* #undef SDL_HAPTIC_ANDROID */
-/* #undef SDL_HAPTIC_LINUX */
-/* #undef SDL_HAPTIC_IOKIT */
-/* #undef SDL_HAPTIC_DINPUT */
-/* #undef SDL_HAPTIC_XINPUT */
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-/* #undef SDL_LOADSO_DUMMY */
-/* #undef SDL_LOADSO_LDG */
-/* #undef SDL_LOADSO_WINDOWS */
-
-/* Enable various threading systems */
-/* #undef SDL_THREAD_PTHREAD */
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
-/* #undef SDL_THREAD_WINDOWS */
-
-/* Enable various timer systems */
-/* #undef SDL_TIMER_HAIKU */
-/* #undef SDL_TIMER_DUMMY */
-#define SDL_TIMER_UNIX 1
-/* #undef SDL_TIMER_WINDOWS */
-
-/* Enable various video drivers */
-/* #undef SDL_VIDEO_DRIVER_HAIKU */
-/* #undef SDL_VIDEO_DRIVER_COCOA */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-/* #undef SDL_VIDEO_DRIVER_WINDOWS */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
-/* #undef SDL_VIDEO_DRIVER_MIR */
-/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
-/* #undef SDL_VIDEO_DRIVER_X11 */
-/* #undef SDL_VIDEO_DRIVER_RPI */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
-/* #undef SDL_VIDEO_DRIVER_ANDROID */
-#define SDL_VIDEO_DRIVER_EMSCRIPTEN 1
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
-/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
-/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
-/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
-/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
-/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
-/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
-/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
-/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
-/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
-/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
-/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
-/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
-/* #undef SDL_VIDEO_DRIVER_NACL */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-/* #undef SDL_VIDEO_DRIVER_QNX */
-/* #undef SDL_VIDEO_DRIVER_HEADLESS */
-
-/* #undef SDL_VIDEO_RENDER_D3D */
-/* #undef SDL_VIDEO_RENDER_D3D11 */
-/* #undef SDL_VIDEO_RENDER_OGL */
-/* #undef SDL_VIDEO_RENDER_OGL_ES */
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-/* #undef SDL_VIDEO_RENDER_DIRECTFB */
-/* #undef SDL_VIDEO_RENDER_METAL */
-
-/* Enable OpenGL support */
-/* #undef SDL_VIDEO_OPENGL */
-/* #undef SDL_VIDEO_OPENGL_ES */
-#define SDL_VIDEO_OPENGL_ES2 1
-/* #undef SDL_VIDEO_OPENGL_BGL */
-/* #undef SDL_VIDEO_OPENGL_CGL */
-#define SDL_VIDEO_OPENGL_EGL 1
-/* #undef SDL_VIDEO_OPENGL_GLX */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_WGL */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
-
-/* Enable Vulkan support */
-/* #undef SDL_VIDEO_VULKAN */
-
-/* Enable system power support */
-/* #undef SDL_POWER_LINUX */
-/* #undef SDL_POWER_WINDOWS */
-/* #undef SDL_POWER_MACOSX */
-/* #undef SDL_POWER_HAIKU */
-/* #undef SDL_POWER_ANDROID */
-#define SDL_POWER_EMSCRIPTEN 1
-/* #undef SDL_POWER_HARDWIRED */
-
-/* Enable system filesystem support */
-/* #undef SDL_FILESYSTEM_HAIKU */
-/* #undef SDL_FILESYSTEM_COCOA */
-/* #undef SDL_FILESYSTEM_DUMMY */
-/* #undef SDL_FILESYSTEM_UNIX */
-/* #undef SDL_FILESYSTEM_WINDOWS */
-/* #undef SDL_FILESYSTEM_NACL */
-/* #undef SDL_FILESYSTEM_ANDROID */
-#define SDL_FILESYSTEM_EMSCRIPTEN 1
-
-/* Enable assembly routines */
-/* #undef SDL_ASSEMBLY_ROUTINES */
-/* #undef SDL_ALTIVEC_BLITTERS */
-
-/* Enable ime support */
-/* #undef SDL_USE_IME */
-
-/* Enable dynamic udev support */
-/* #undef SDL_UDEV_DYNAMIC */
-
-/* Enable dynamic libsamplerate support */
-/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
-
-#endif /* _SDL_config_emscripten_h */
diff --git a/build_tools/third_party/sdl2/SDL_config_linux.h b/build_tools/third_party/sdl2/SDL_config_linux.h
deleted file mode 100644
index 60e324f..0000000
--- a/build_tools/third_party/sdl2/SDL_config_linux.h
+++ /dev/null
@@ -1,405 +0,0 @@
-#ifndef SDL_config_linux_h
-#define SDL_config_linux_h
-#define SDL_config_h_
-
-/**
- *  \file SDL_config_linux.h
- *
- *  This is a configuration that can be used to build SDL for Linux
- */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-/* Make sure that this isn't included by Visual C++ */
-#ifdef _MSC_VER
-#error You should run hg revert SDL_config.h
-#endif
-
-/* C language features */
-/* #undef const */
-/* #undef inline */
-/* #undef volatile */
-
-/* C datatypes */
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-#define HAVE_GCC_ATOMICS 1
-/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
-
-/* Comment this if you want to build without any C library requirements */
-#define HAVE_LIBC 1
-#if HAVE_LIBC
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MATH_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_WCHAR_H 1
-/* #undef HAVE_PTHREAD_NP_H */
-/* #undef HAVE_LIBUNWIND_H */
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#endif
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_WCSLEN 1
-/* #undef HAVE_WCSLCPY */
-/* #undef HAVE_WCSLCAT */
-#define HAVE_WCSCMP 1
-#define HAVE_STRLEN 1
-/* #undef HAVE_STRLCPY */
-/* #undef HAVE_STRLCAT */
-/* #undef HAVE__STRREV */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-/* #undef HAVE_INDEX */
-/* #undef HAVE_RINDEX */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* #undef HAVE_ITOA */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__UITOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-/* #undef HAVE__I64TOA */
-/* #undef HAVE__UI64TOA */
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-/* #undef HAVE__STRICMP */
-#define HAVE_STRCASECMP 1
-/* #undef HAVE__STRNICMP */
-#define HAVE_STRNCASECMP 1
-/* #undef HAVE_SSCANF */
-#define HAVE_VSSCANF 1
-/* #undef HAVE_SNPRINTF */
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI /**/
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_EXP 1
-#define HAVE_EXPF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-/* #define HAVE_FOPEN64 1 */
-#define HAVE_FSEEKO 1
-/* #define HAVE_FSEEKO64 1 */
-#define HAVE_SIGACTION 1
-#define HAVE_SA_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-/* #undef HAVE_SYSCTLBYNAME */
-#define HAVE_CLOCK_GETTIME 1
-/* #undef HAVE_GETPAGESIZE */
-#define HAVE_MPROTECT 1
-#define HAVE_ICONV 1
-#define HAVE_PTHREAD_SETNAME_NP 1
-/* #undef HAVE_PTHREAD_SET_NAME_NP */
-#define HAVE_SEM_TIMEDWAIT 1
-#define HAVE_GETAUXVAL 1
-#define HAVE_POLL 1
-#define HAVE__EXIT 1
-
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#define HAVE_STDINT_H 1
-#endif /* HAVE_LIBC */
-
-/* #undef HAVE_ALTIVEC_H */
-/* #define HAVE_DBUS_DBUS_H 1 */
-/* #undef HAVE_FCITX_FRONTEND_H */
-/* #define HAVE_IBUS_IBUS_H 1 */
-#define HAVE_IMMINTRIN_H 1
-/* #undef HAVE_LIBSAMPLERATE_H */
-#define HAVE_LIBUDEV_H 1
-
-/* #undef HAVE_DDRAW_H */
-/* #undef HAVE_DINPUT_H */
-/* #undef HAVE_DSOUND_H */
-/* #undef HAVE_DXGI_H */
-/* #undef HAVE_XINPUT_H */
-/* #undef HAVE_MMDEVICEAPI_H */
-/* #undef HAVE_AUDIOCLIENT_H */
-/* #undef HAVE_XINPUT_GAMEPAD_EX */
-/* #undef HAVE_XINPUT_STATE_EX */
-
-/* SDL internal assertion support */
-/* #undef SDL_DEFAULT_ASSERT_LEVEL */
-
-/* Allow disabling of core subsystems */
-/* #undef SDL_ATOMIC_DISABLED */
-/* #undef SDL_AUDIO_DISABLED */
-/* #undef SDL_CPUINFO_DISABLED */
-/* #undef SDL_EVENTS_DISABLED */
-/* #undef SDL_FILE_DISABLED */
-/* #undef SDL_JOYSTICK_DISABLED */
-/* #undef SDL_HAPTIC_DISABLED */
-/* #undef SDL_SENSOR_DISABLED */
-/* #undef SDL_LOADSO_DISABLED */
-/* #undef SDL_RENDER_DISABLED */
-/* #undef SDL_THREADS_DISABLED */
-/* #undef SDL_TIMERS_DISABLED */
-/* #undef SDL_VIDEO_DISABLED */
-/* #undef SDL_POWER_DISABLED */
-/* #undef SDL_FILESYSTEM_DISABLED */
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_ALSA 1
-#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC "libasound.so.2"
-/* #undef SDL_AUDIO_DRIVER_ANDROID */
-/* #undef SDL_AUDIO_DRIVER_ARTS */
-/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
-#define SDL_AUDIO_DRIVER_DISK 1
-/* #undef SDL_AUDIO_DRIVER_DSOUND */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
-/* #undef SDL_AUDIO_DRIVER_ESD */
-/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_HAIKU */
-/* #undef SDL_AUDIO_DRIVER_JACK */
-/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NACL */
-/* #undef SDL_AUDIO_DRIVER_NAS */
-/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NETBSD */
-#define SDL_AUDIO_DRIVER_OSS 1
-/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
-/* #undef SDL_AUDIO_DRIVER_PAUDIO */
-#define SDL_AUDIO_DRIVER_PULSEAUDIO 1
-#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "libpulse-simple.so.0"
-/* #undef SDL_AUDIO_DRIVER_QSA */
-#define SDL_AUDIO_DRIVER_SNDIO 1
-#define SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "libsndio.so.7.0"
-/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
-/* #undef SDL_AUDIO_DRIVER_WASAPI */
-/* #undef SDL_AUDIO_DRIVER_WINMM */
-
-/* Enable various input drivers */
-#define SDL_INPUT_LINUXEV 1
-#define SDL_INPUT_LINUXKD 1
-/* #undef SDL_INPUT_TSLIB */
-/* #undef SDL_JOYSTICK_HAIKU */
-/* #undef SDL_JOYSTICK_DINPUT */
-/* #undef SDL_JOYSTICK_XINPUT */
-/* #undef SDL_JOYSTICK_DUMMY */
-/* #undef SDL_JOYSTICK_IOKIT */
-#define SDL_JOYSTICK_LINUX 1
-/* #undef SDL_JOYSTICK_ANDROID */
-/* #undef SDL_JOYSTICK_WINMM */
-/* #undef SDL_JOYSTICK_USBHID */
-/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
-/* #undef SDL_JOYSTICK_HIDAPI */
-/* #undef SDL_JOYSTICK_EMSCRIPTEN */
-/* #undef SDL_HAPTIC_DUMMY */
-/* #undef SDL_HAPTIC_ANDROID */
-#define SDL_HAPTIC_LINUX 1
-/* #undef SDL_HAPTIC_IOKIT */
-/* #undef SDL_HAPTIC_DINPUT */
-/* #undef SDL_HAPTIC_XINPUT */
-
-/* Enable various sensor drivers */
-/* #undef SDL_SENSOR_ANDROID */
-#define SDL_SENSOR_DUMMY 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-/* #undef SDL_LOADSO_DUMMY */
-/* #undef SDL_LOADSO_LDG */
-/* #undef SDL_LOADSO_WINDOWS */
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
-/* #undef SDL_THREAD_WINDOWS */
-
-/* Enable various timer systems */
-/* #undef SDL_TIMER_HAIKU */
-/* #undef SDL_TIMER_DUMMY */
-#define SDL_TIMER_UNIX 1
-/* #undef SDL_TIMER_WINDOWS */
-
-/* Enable various video drivers */
-/* #undef SDL_VIDEO_DRIVER_HAIKU */
-/* #undef SDL_VIDEO_DRIVER_COCOA */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-/* #undef SDL_VIDEO_DRIVER_WINDOWS */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
-#define SDL_VIDEO_DRIVER_X11 1
-/* #undef SDL_VIDEO_DRIVER_RPI */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
-/* #undef SDL_VIDEO_DRIVER_ANDROID */
-/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "libXcursor.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "libXinerama.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "libXi.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "libXrandr.so.2"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "libXss.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "libXxf86vm.so.1"
-#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-/* #undef SDL_VIDEO_DRIVER_NACL */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-/* #undef SDL_VIDEO_DRIVER_QNX */
-
-/* #undef SDL_VIDEO_RENDER_D3D */
-/* #undef SDL_VIDEO_RENDER_D3D11 */
-#define SDL_VIDEO_RENDER_OGL 1
-/* #undef SDL_VIDEO_RENDER_OGL_ES */
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-/* #undef SDL_VIDEO_RENDER_DIRECTFB */
-/* #undef SDL_VIDEO_RENDER_METAL */
-
-/* Enable OpenGL support */
-#define SDL_VIDEO_OPENGL 1
-/* #undef SDL_VIDEO_OPENGL_ES */
-#define SDL_VIDEO_OPENGL_ES2 1
-/* #undef SDL_VIDEO_OPENGL_BGL */
-/* #undef SDL_VIDEO_OPENGL_CGL */
-#define SDL_VIDEO_OPENGL_EGL 1
-#define SDL_VIDEO_OPENGL_GLX 1
-/* #undef SDL_VIDEO_OPENGL_WGL */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable Metal support */
-/* #undef SDL_VIDEO_METAL */
-
-/* Enable system power support */
-#define SDL_POWER_LINUX 1
-/* #undef SDL_POWER_WINDOWS */
-/* #undef SDL_POWER_MACOSX */
-/* #undef SDL_POWER_HAIKU */
-/* #undef SDL_POWER_ANDROID */
-/* #undef SDL_POWER_EMSCRIPTEN */
-/* #undef SDL_POWER_HARDWIRED */
-
-/* Enable system filesystem support */
-/* #undef SDL_FILESYSTEM_HAIKU */
-/* #undef SDL_FILESYSTEM_COCOA */
-/* #undef SDL_FILESYSTEM_DUMMY */
-#define SDL_FILESYSTEM_UNIX 1
-/* #undef SDL_FILESYSTEM_WINDOWS */
-/* #undef SDL_FILESYSTEM_NACL */
-/* #undef SDL_FILESYSTEM_ANDROID */
-/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
-
-/* Enable assembly routines */
-#define SDL_ASSEMBLY_ROUTINES 1
-/* #undef SDL_ALTIVEC_BLITTERS */
-/* #undef SDL_ARM_SIMD_BLITTERS */
-/* #undef SDL_ARM_NEON_BLITTERS */
-
-/* Enable ime support */
-#define SDL_USE_IME 1
-
-/* Enable dynamic udev support */
-#define SDL_UDEV_DYNAMIC "libudev.so.1"
-
-/* Enable dynamic libusb support */
-/* #undef SDL_LIBUSB_DYNAMIC */
-
-/* Enable dynamic libsamplerate support */
-/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
-
-#endif /* SDL_config_linux_h */
diff --git a/build_tools/third_party/sdl2/SDL_config_macosx.h b/build_tools/third_party/sdl2/SDL_config_macosx.h
deleted file mode 100644
index 2fdcf73..0000000
--- a/build_tools/third_party/sdl2/SDL_config_macosx.h
+++ /dev/null
@@ -1,215 +0,0 @@
-#ifndef SDL_config_macosx_h_
-#define SDL_config_macosx_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
-#include <AvailabilityMacros.h>
-
-/* This is a set of defines to configure the SDL features */
-
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_LIBUNWIND_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY 1
-#define HAVE_STRLCAT 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_SYSCTLBYNAME 1
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_COREAUDIO 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_IOKIT 1
-#define SDL_HAPTIC_IOKIT 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX 1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_COCOA 1
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#undef SDL_VIDEO_DRIVER_X11
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA \
-  "/usr/X11R6/lib/libXinerama.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE \
-  "/usr/X11R6/lib/libXxf86vm.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-
-#ifdef MAC_OS_X_VERSION_10_8
-/*
- * No matter the versions targeted, this is the 10.8 or later SDK, so you have
- *  to use the external Xquartz, which is a more modern Xlib. Previous SDKs
- *  used an older Xlib.
- */
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-
-/*#ifndef SDL_VIDEO_RENDER_OGL_ES2*/
-/*#define SDL_VIDEO_RENDER_OGL_ES2 1*/
-/*#endif*/
-
-/*#ifndef SDL_VIDEO_RENDER_METAL*/
-/* Metal only supported on 64-bit architectures with 10.11+ */
-/*#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)*/
-/*#define SDL_VIDEO_RENDER_METAL    1*/
-/*#else*/
-/*#define SDL_VIDEO_RENDER_METAL    0*/
-/*#endif*/
-/*#endif*/
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-/*#ifndef SDL_VIDEO_OPENGL_ES2*/
-/*#define SDL_VIDEO_OPENGL_ES2    1*/
-/*#endif*/
-/*#ifndef SDL_VIDEO_OPENGL_EGL*/
-/*#define SDL_VIDEO_OPENGL_EGL    1*/
-/*#endif*/
-#ifndef SDL_VIDEO_OPENGL_CGL
-#define SDL_VIDEO_OPENGL_CGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_GLX
-#define SDL_VIDEO_OPENGL_GLX 1
-#endif
-
-/* Enable Vulkan support */
-/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
-#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
-#define SDL_VIDEO_VULKAN 1
-#else
-#define SDL_VIDEO_VULKAN 0
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_MACOSX 1
-
-/* enable filesystem support */
-#define SDL_FILESYSTEM_COCOA 1
-
-/* Enable assembly routines */
-#define SDL_ASSEMBLY_ROUTINES 1
-#ifdef __ppc__
-#define SDL_ALTIVEC_BLITTERS 1
-#endif
-
-#endif /* SDL_config_macosx_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_minimal.h b/build_tools/third_party/sdl2/SDL_config_minimal.h
deleted file mode 100644
index 0ef59a9..0000000
--- a/build_tools/third_party/sdl2/SDL_config_minimal.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef SDL_config_minimal_h_
-#define SDL_config_minimal_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- *  \file SDL_config_minimal.h
- *
- *  This is the minimal configuration that can be used to build SDL.
- */
-
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-
-/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
-#if defined(_MSC_VER) && (_MSC_VER < 1600)
-/* Here are some reasonable defaults */
-typedef unsigned int size_t;
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-typedef unsigned long uintptr_t;
-#else
-#define HAVE_STDINT_H 1
-#endif /* Visual Studio 2008 */
-
-#ifdef __GNUC__
-#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
-#endif
-
-/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
-#define SDL_JOYSTICK_DISABLED 1
-
-/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
-#define SDL_HAPTIC_DISABLED 1
-
-/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED 1
-
-/* Enable the stub thread support (src/thread/generic/\*.c) */
-#define SDL_THREADS_DISABLED 1
-
-/* Enable the stub timer support (src/timer/dummy/\*.c) */
-#define SDL_TIMERS_DISABLED 1
-
-/* Enable the dummy video driver (src/video/dummy/\*.c) */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-
-/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
-#define SDL_FILESYSTEM_DUMMY 1
-
-#endif /* SDL_config_minimal_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_windows.h b/build_tools/third_party/sdl2/SDL_config_windows.h
deleted file mode 100644
index 7626de6..0000000
--- a/build_tools/third_party/sdl2/SDL_config_windows.h
+++ /dev/null
@@ -1,238 +0,0 @@
-#ifndef SDL_config_windows_h_
-#define SDL_config_windows_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-// Explicitly include headers for SSE intrinsics.
-// SDL itself conditionally chooses to not include these on Windows, but they
-// appear to be needed on some systems anyway.
-#include <intrin.h>
-#include <xmmintrin.h>
-
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
-#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-
-#ifdef _WIN64
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-#define HAVE_DDRAW_H 1
-#define HAVE_DINPUT_H 1
-#define HAVE_DSOUND_H 1
-#define HAVE_DXGI_H 1
-#define HAVE_XINPUT_H 1
-
-/* This is disabled by default to avoid C runtime dependencies and manifest
- * requirements */
-#define HAVE_LIBC 1  // Enable it anyway :D
-#ifdef HAVE_LIBC
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE__STRREV 1
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE__STRICMP 1
-#define HAVE__STRNICMP 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEILF 1
-#define HAVE__COPYSIGN 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#if defined(_MSC_VER)
-/* These functions were added with the VC++ 2013 C runtime library */
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#endif
-/* This function is available with at least the VC++ 2008 C runtime library */
-#if _MSC_VER >= 1400
-#define HAVE__FSEEKI64 1
-#endif
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_WASAPI 1
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT 1
-#define SDL_HAPTIC_XINPUT 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
-
-/* Enable/disable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 0
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
-
-/* Disable OpenGL support, just use Vulkan */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 0
-#endif
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
-
-/* Disable sensor support */
-#define SDL_SENSOR_DISABLED 1
-
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
-#endif
-
-#endif /* SDL_config_windows_h_ */
diff --git a/docs/developing_iree/repository_management.md b/docs/developing_iree/repository_management.md
index c481dc8..1cc7030 100644
--- a/docs/developing_iree/repository_management.md
+++ b/docs/developing_iree/repository_management.md
@@ -103,13 +103,11 @@
 ```text
 6ec136281086b71da32b5fb068bd6e46b78a5c79 third_party/abseil-cpp
 309de5988eb949a27e077a24a1d83c0687d10d57 third_party/benchmark
-4c13807b7d43ff0946b7ffea0ae3aee9e611d778 third_party/dear_imgui
 97f3aa91746a7d207513a73725e92cee7c35bb87 third_party/flatbuffers
 3d62e9545bd15c5df9ccfdd8453b93d64a6dd8eb third_party/ruy
 f2fb48c3b3d79a75a88a99fba6576b25d42ec528 third_party/googletest
 a21beccea2020f950845cbb68db663d0737e174c third_party/llvm-project
 80d452484c5409444b0ec19383faa84bb7a4d351 third_party/pybind11
-b73f111094da3e380a1774b56b15f16c90ae8e23 third_party/sdl2
 b252a50953ac4375cb1864e94f4b0234db9d215d third_party/spirv_headers
 6652f0b6428777b5a4a3d191cc30d8b31366b999 third_party/swiftshader
 9b32b2db1142166b190ea30757f48d8dd0fb00e3 third_party/tensorflow
diff --git a/iree/samples/vulkan/CMakeLists.txt b/iree/samples/vulkan/CMakeLists.txt
index f6ab0b9..785eb2c 100644
--- a/iree/samples/vulkan/CMakeLists.txt
+++ b/iree/samples/vulkan/CMakeLists.txt
@@ -33,7 +33,7 @@
 # https://vulkan.lunarg.com/.
 # If Vulkan is not found, omit the target.
 if(NOT TARGET iree::testing::vulkan::vulkan_gui_util)
-  message(NOTICE "Vulkan was not found, skipping vulkan_inference_gui sample")
+  message(VERBOSE "Missing Vulkan dependencies, skipping vulkan_inference_gui sample")
   return()
 endif()
 
diff --git a/iree/samples/vulkan/vulkan_inference_gui.cc b/iree/samples/vulkan/vulkan_inference_gui.cc
index 25967ef..45e4ab4 100644
--- a/iree/samples/vulkan/vulkan_inference_gui.cc
+++ b/iree/samples/vulkan/vulkan_inference_gui.cc
@@ -316,10 +316,10 @@
     if (g_SwapChainRebuild) {
       g_SwapChainRebuild = false;
       ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
-      ImGui_ImplVulkanH_CreateWindow(g_Instance, g_PhysicalDevice, g_Device,
-                                     &g_MainWindowData, g_QueueFamily,
-                                     g_Allocator, g_SwapChainResizeWidth,
-                                     g_SwapChainResizeHeight, g_MinImageCount);
+      ImGui_ImplVulkanH_CreateOrResizeWindow(
+          g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData,
+          g_QueueFamily, g_Allocator, g_SwapChainResizeWidth,
+          g_SwapChainResizeHeight, g_MinImageCount);
       g_MainWindowData.FrameIndex = 0;
     }
 
diff --git a/iree/testing/vulkan/CMakeLists.txt b/iree/testing/vulkan/CMakeLists.txt
index 2278ac7..8b650aa 100644
--- a/iree/testing/vulkan/CMakeLists.txt
+++ b/iree/testing/vulkan/CMakeLists.txt
@@ -22,6 +22,21 @@
 # If Vulkan is not found, omit the target.
 include(FindVulkan)
 if(NOT Vulkan_FOUND)
+  message(VERBOSE "Could not find Vulkan, disabling Vulkan GUI programs")
+  return()
+endif()
+
+# vcpkg install imgui[vulkan-binding,sdl2-binding]
+find_package(imgui CONFIG QUIET)
+if(NOT imgui_FOUND)
+  message(VERBOSE "Could not find Dear ImGui, disabling Vulkan GUI programs")
+  return()
+endif()
+
+# vcpkg install sdl2[vulkan]
+find_package(SDL2 CONFIG QUIET)
+if(NOT SDL2_FOUND)
+  message(VERBOSE "Could not find SDL2, disabling Vulkan GUI programs")
   return()
 endif()
 
@@ -33,13 +48,11 @@
   SRCS
     "vulkan_gui_util.cc"
   DEPS
-    dear_imgui::dear_imgui
-    dear_imgui::impl_sdl
-    dear_imgui::impl_vulkan
+    imgui::imgui
     iree::base::api
     iree::base::logging
     iree::hal::vulkan::api
-    SDL2-static
+    SDL2::SDL2
     Vulkan::Vulkan
 )
 
diff --git a/iree/testing/vulkan/vulkan_gui_util.cc b/iree/testing/vulkan/vulkan_gui_util.cc
index 4c93bb3..c633c2c 100644
--- a/iree/testing/vulkan/vulkan_gui_util.cc
+++ b/iree/testing/vulkan/vulkan_gui_util.cc
@@ -295,9 +295,9 @@
 
   // Create SwapChain, RenderPass, Framebuffer, etc.
   IM_ASSERT(min_image_count >= 2);
-  ImGui_ImplVulkanH_CreateWindow(instance, physical_device, device, wd,
-                                 queue_family_index, allocator, width, height,
-                                 min_image_count);
+  ImGui_ImplVulkanH_CreateOrResizeWindow(instance, physical_device, device, wd,
+                                         queue_family_index, allocator, width,
+                                         height, min_image_count);
 
   // Set clear color.
   ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
diff --git a/iree/testing/vulkan/vulkan_gui_util.h b/iree/testing/vulkan/vulkan_gui_util.h
index c43cc5d..05288bd 100644
--- a/iree/testing/vulkan/vulkan_gui_util.h
+++ b/iree/testing/vulkan/vulkan_gui_util.h
@@ -14,18 +14,15 @@
 
 #include <SDL.h>
 #include <SDL_vulkan.h>
+#include <imgui.h>
+#include <imgui_impl_sdl.h>
+#include <imgui_impl_vulkan.h>
 #include <vulkan/vulkan.h>
 
 #include <vector>
 
 #include "iree/hal/vulkan/api.h"
 
-// NOTE: order matters here, imgui must come first:
-#include "third_party/dear_imgui/imgui.h"
-// NOTE: must follow imgui.h:
-#include "third_party/dear_imgui/examples/imgui_impl_sdl.h"
-#include "third_party/dear_imgui/examples/imgui_impl_vulkan.h"
-
 namespace iree {
 
 // Returns the names of the Vulkan instance layers needed for the given IREE
diff --git a/third_party/dear_imgui b/third_party/dear_imgui
deleted file mode 160000
index 4c13807..0000000
--- a/third_party/dear_imgui
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4c13807b7d43ff0946b7ffea0ae3aee9e611d778
diff --git a/third_party/sdl2 b/third_party/sdl2
deleted file mode 160000
index a1390ed..0000000
--- a/third_party/sdl2
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a1390ed39ec77ecfb574bc6fcd5bfc5e3adbdea9