Wow, this works. Or at least it compiles.
Setup:
Download SDL 2.30.1 from here: https://github.com/libsdl-org/SDL/releases/tag/release-2.30.1 Update CMake files with path to the unzipped SDL2 library. IMPORTANT! The appropriate download is NOT the mingw set, it's the Windows one. mingw is for writing linux-like code on Windows.
Build on CLion with CMake.