To make use of of ninja, the cmake statement above has to include the argument -GNinja. Combining both cmake and ninja may look like this:
cmake
-GNinja