1.下载源码
git clone https://github.com/libsdl-org/SDL.git --recursive
2.使用cmake编译
cmake .. -DCMAKE_INSTALL_PREFIX=/mingw64 -DSDL_VIDEO_DRIVER_WINDOWS=ON -DSDL_VIDEO_X11=OFF -DSDL_VIDEO_DRIVER_WAYLAND=OFF -DSDL_VIDEO_DIRECT3D=ON
出现如下错误:
SDL could not find X11 or Wayland development libraries on your system.