Interesting issue trying to compile windows RC files using Ninja & MSVC

I’ve create a very simple repo for reproducing the bug here.

The steps to reproduce are as such:

  1. Clone the test repo above
  2. Open a Visual Studio 2019 x64 Native Tools Command Prompt (or just run vcvarsall x64)
  3. cd to the test repo source directory, run mkdir build, then cd build
  4. Run cmake -G Ninja .. to generate the Ninja build files
  5. Run cmake --build . or ninja to run the build and trigger the issue