Ninja
build tool can be installed using one of two ways:
- Build and install from sources:
- [Windows only] open a Visual Studio x64 native tools command prompt
git clone https://github.com/ninja-build/ninja.git
- cd ninja && python configure.py –bootstrap
- Using the binaries
- Download the release from here based on your OS.
- Place the binary to an appropriate location.
- Add that placed binary location to
PATH
.
# Generate (configure)
cmake . -B build -G Ninja ...
# Make sure build.ninja is generated under build directory
# Build (compile, link)
# Option 1
cmake -- build build --config <...>
# Option 2
cd build
ninja
# Install
# Option 1
cmake --install build --config <...>
# Option 2
cd build
ninja install