# Cross Compiling with MinGW 64


As I do not own any Windows machine, builds on Windows rely on [MinGW](https://www.mingw-w64.org) which is install with the ArchLinux package group `mingw-64-toolchain` (contains [MinGW64 Crosscompilation parts](https://archlinux.org/packages/?q=mingw-w64))

## Install MinGW

```bash
pacman -S mingw-w64-toolchain
```

## Create Build

The root folder adds a `.gitignore` rule to leave out everything `build*`

```bash
mkdir -p build_w64
cd build_w64
```

## Configure

```bash
cmake . -DCMAKE_TOOLCHAIN_FILE=../etc/cmake/mingw64-toolchain.cmake
```

## Build

```bash
cmake --build .
```
