This is the cross compiler version of the msys2.
Tested with: MXE_TARGETS := x86_64-w64-mingw32.static
make cc cmake ncurses sdl2 sdl2_image
xxd must be available on the host.
LIBRETRO and APPLEN are supported.
x86_64-w64-mingw32.static-cmake -DBUILD_LIBRETRO=ON -G Ninja
docker run -it --rm -v "$(pwd):/build" git.libretro.com:5050/libretro-infrastructure/libretro-build-mxe-win-cross-cores:gcc11 bash
cd /usr/lib/mxe
apt update
apt install xxd
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-cmake -DBUILD_LIBRETRO=ON -B build -G Ninja