Ninja is only half the story. those files are really written to be generated so you need something else.
Most packages in vcpkg use cmake. If library maintainer doesn't do anything too unusual in the CMake config then vcpkg can request ninja builds without any explicit support from the library.
pkgconf and meson in that case.
Most packages in vcpkg use cmake. If library maintainer doesn't do anything too unusual in the CMake config then vcpkg can request ninja builds without any explicit support from the library.