mirror of
https://github.com/reactos/ninja.git
synced 2025-02-20 03:30:55 +00:00
Add more instructions for building ninja in Windows (#1169)
This should clarify that the instructions are for Visual Studio. It also opens the possibility for others to write similar sections for using gcc/clang in Windows.
This commit is contained in:
parent
f95652d587
commit
cadcfc19ba
40
HACKING.md
40
HACKING.md
@ -19,8 +19,44 @@ You should end up with a `ninja` binary (or `ninja.exe`) in the project root.
|
||||
|
||||
On Windows, you'll need to install Python to run `configure.py`, and
|
||||
run everything under a Visual Studio Tools Command Prompt (or after
|
||||
running `vcvarsall` in a normal command prompt). See below if you
|
||||
want to use mingw or some other compiler instead of Visual Studio.
|
||||
running `vcvarsall` in a normal command prompt).
|
||||
|
||||
For other combinations such as gcc/clang you will need the compiler
|
||||
(gcc/cl) in your PATH and you will have to set the appropriate
|
||||
platform configuration script.
|
||||
|
||||
See below if you want to use mingw or some other compiler instead of
|
||||
Visual Studio.
|
||||
|
||||
##### Using Visual Studio
|
||||
Assuming that you now have python installed, then the steps for building under
|
||||
Windows using Visual Studio are:
|
||||
|
||||
Clone and checkout the latest release (or whatever branch you want). You
|
||||
can do this in either a command prompt or by opening a git bash prompt:
|
||||
|
||||
```
|
||||
$ git clone git://github.com/ninja-build/ninja.git && cd ninja
|
||||
$ git checkout release
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
1. Open a Windows command prompt in the folder where you checked out ninja.
|
||||
2. Select the Microsoft build environment by running
|
||||
`vcvarsall.bat` with the appropriate environment.
|
||||
3. Build ninja and test it.
|
||||
|
||||
The steps for a Visual Studio 2015 64-bit build are outlined here:
|
||||
|
||||
```
|
||||
> "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
|
||||
> python configure.py --bootstrap
|
||||
> ninja --help
|
||||
```
|
||||
Copy the ninja executable to another location, if desired, e.g. C:\local\Ninja.
|
||||
|
||||
Finally add the path where ninja.exe is to the PATH variable.
|
||||
|
||||
### Adjusting build flags
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user