Here are some general notes to remind me how to setup
ninja to compile from the command line.
Things you will need:
Setting up environment for Windows
The key is to setup the environment on Windows, there is a script for this that comes with your Visual Studio install known as
vcvarsall.bat. You can add this to the startup options in
cmder as the below command.
cmd /k ""%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64 && "%ConEmuDir%\..\init.bat"" -new_console:d:%USERPROFILE%
As you can see above, there is an
x64just after the
vcvarsall.bat, as you might have guessed this specifies 64-bit builds. Remove this for 32-bit builds!
It’s as simple as that! Now hopefully I’ll never forget this and can refer to this post.
Using CMake and ninja going forward is as simple as specifying as the generator with
cmake -G Ninja ..