Skip to content

Commit 10bf008

Browse files
d3davekripken
authored andcommitted
README: Add instructions for build with Visual C++ (#1337)
1 parent f4b7df0 commit 10bf008

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,28 @@ Note that you can also use `ninja` as your generator: `cmake -G Ninja . && ninja
8484

8585
If you also want to compile C/C++ to WebAssembly (and not just asm.js to WebAssembly), you'll need Emscripten. You'll need the `incoming` branch there (which you can get via [the SDK](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html)), for more details see [the wiki](https://github.com/kripken/emscripten/wiki/WebAssembly).
8686

87+
### Visual C++
88+
89+
1. Using the Microsoft Visual Studio Installer, install the "Visual C++ tools for CMake" component.
90+
91+
1. Generate the projects:
92+
93+
```
94+
mkdir build
95+
cd build
96+
"%VISUAL_STUDIO_ROOT%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" ..
97+
```
98+
99+
Substitute VISUAL_STUDIO_ROOT with the path to your Visual Studio installation. In case you are using the Visual Studio Build Tools, the path will be "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools".
100+
101+
1. From the Developer Command Prompt, build the desired projects:
102+
103+
```
104+
msbuild binaryen.vcxproj
105+
```
106+
107+
CMake generates a project named "ALL_BUILD.vcxproj" for conveniently building all the projects.
108+
87109
## Running
88110

89111
### wasm-opt

0 commit comments

Comments
 (0)