As it turns out, I WASN'T building SFML and running the project with the same compiler. I have two versions of mingw-64 installed on my computer and even though I had specified which to use, CMake still used the other one. I only discovered this after deleting the other version and trying to run again, it told me the compiler was missing. Once I rebuilt everything with the right compiler everything worked.