Skip to content

Commit c65b574

Browse files
committed
Add build instructions for Windows. Add a note on dependencies on Linux.
1 parent 717cff1 commit c65b574

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Readme.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ The C++ headers `shader_bytecode.h` and `shader_binary` can be easily be include
5656

5757
For the standalone assembler and disassembler, you will also need CMake to generate build files (however it is simple to setup a different build system from scratch if need be), and at least parts of the [Boost libraries](http://www.boost.org/) installed (including Spirit, Fusion, and others).
5858

59+
### Installing dependencies on Windows
60+
61+
You will need to download [CMake](https://cmake.org/download/) and [Boost](http://www.boost.org/users/download/) from their respective download pages. Both projects provide prebuilt binaries. Note that the Boost binaries only work with MSVC, so MinGW users will need to obtain prebuilt binaries from an unofficial source (not recommended) or build Boost from source.
62+
63+
### Installing dependencies on Linux
64+
65+
Chances are your Linux distribution already has CMake and Boost installed. Use your package manager to verify this is the case and to install them if need be. Note that most distributions provide program binaries and development libraries in separate packages; for building nihstro, both are needed.
66+
5967
### Installing dependencies on OS X
6068

6169
On OS X, it is recommended that you use [Homebrew](http://brew.sh/) to install dependencies. You'll need to run the following to build nihstro:
@@ -64,9 +72,9 @@ On OS X, it is recommended that you use [Homebrew](http://brew.sh/) to install d
6472
brew install cmake boost
6573
```
6674

67-
### Compiling
75+
### Compiling on Linux, OS X, and other Unix-like systems
6876

69-
To compile the standalone assembler and disassembler, run:
77+
To compile the standalone assembler and disassembler, run the following commands from within the nihstro root directory:
7078

7179
```
7280
mkdir -p build
@@ -77,6 +85,16 @@ make
7785

7886
This will build the `nihstro-assemble` and `nihstro-disassemble` standalone executables inside the `build` directory.
7987

88+
### Compiling on Windows
89+
90+
Start the [CMake GUI](https://cmake.org/runningcmake/). You will have to provide two paths: The source code location and the build directory. Point the former to the nihstro root directory, and the latter to a subdirectory called `build`. You may need to create this directory manually if it doesn't exist.
91+
92+
To make sure CMake finds your Boost installation, press the "Add Entry" button and create a new PATH variable with the name `BOOST_ROOT`. Point it towards the root directory of your boost installation. The correct folder should contain a subdirectory called `boost` with lots of further child directories.
93+
94+
Once you're done, hit the "Configure" button and adjust the compiler settings appropriately (usually, the default settings should be fine). If an error occurs, CMake might have trouble locating your Boost installation, and you should double-check that you installed the correct set of Boost libraries and that you set up the `BOOST_ROOT` variable correctly.
95+
96+
If all went fine, click "Generate" and use the generated build files in the `build` subdirectory to build nihstro. In particular if you're using MSVC, open the file `build/nihstro.sln` in Visual Studio.
97+
8098
## Contributing
8199
I welcome any contributions! Just create a GitHub fork and submit your changes back via pull requests.
82100

0 commit comments

Comments
 (0)