I had similar issue, you can delete the .ninja_deps from your build folder and this should fix your issue. In my case I am using cmake to generate my build system with generator set to Ninja.
.ninja_deps