Currently flatpak-builder assumes -G 'Unix Makefiles'. CMake also supports generating Ninja rules, but looking at the code, it's not really supported directly.
-G 'Unix Makefiles'
I can provide a patch, although I'm not convinced what's the best way to tackle it, that is, whether there should be an option in manifest cmake-ninja or developer should pass -GNinja to cmake and then flatpak check for build.ninja existence and then fallback to regular Makefile. Let me know what you think about it.
I was interested in the same thing. I don't know a ton about CMake projects but is it common that Ninja breaks any? Maybe that should just be the default if it has no downsides?
I remember having issues with install target when Ninja generator was used while Make was working fine (certainly a bug in upstream project, but still…). I don't think it's the best idea to be too opinionated about packaging tools.
We could use buildsystem: "cmake-ninja" for this i guess. Its possible to pass in the -GNinja argument currently, but it will still run make after cmake...
Yes, although it could be modified to run make or ninja depending on which file exists. I will provide patch implementing cmake-ninja tomorrow.
builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.