summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Maclean <ajpmaclean@users.noreply.github.com>2018-10-30 10:12:13 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2018-10-30 10:12:13 (GMT)
commitcadcfc19ba6cfe38b09bccd44affd5c7e6143472 (patch)
treedeb212143e5b7331713f27716e96635f83b07e6d
parentf95652d587ff8ca9b8597fbb6a47e6abe96af0cf (diff)
downloadNinja-cadcfc19ba6cfe38b09bccd44affd5c7e6143472.zip
Ninja-cadcfc19ba6cfe38b09bccd44affd5c7e6143472.tar.gz
Ninja-cadcfc19ba6cfe38b09bccd44affd5c7e6143472.tar.bz2
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.
-rw-r--r--HACKING.md40
1 files changed, 38 insertions, 2 deletions
diff --git a/HACKING.md b/HACKING.md
index 5e88958..5c2469b 100644
--- a/HACKING.md
+++ b/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