# how to build

If emsdk is not installed, you need to clone it from here: https://github.com/emscripten-core/emsdk

and install:
```
C:\Work\Projects\emsdk\emsdk.bat install latest
```

Then activate the environment:
```
C:\Work\Projects\emsdk\emsdk.bat activate latest
C:\Work\Projects\emsdk\emsdk_env.bat
```


Optionally clear cache:
```
emcc --clear-cache
embuilder build sdl2 sdl2_ttf sdl2_image sdl2_image_jpg sdl2_image_png
```

Build:
```
mkdir build
cd build
emcmake cmake -G Ninja ..
cmake --build .
```

Optionally install:
```
cmake --install .
```

Run:
```
emrun --no_browser --port 8080 public
```
