# 12.3.2.3. How to build Groonga at the repository by CMake on Windows

This document describes how to build Groonga at the repository by CMake on Windows.

If you want to use GNU/Linux or Unix for developing Groonga, see How to build Groonga at the repository by CMake on GNU/Linux or Unix.

Unix is *BSD, Solaris, OS X and so on.

## 12.3.2.3.1. Install depended software

> - Microsoft Visual Studio Express 2013 for Windows Desktop

> - CMake

> - Ruby

>   - RubyInstaller for Windows is recommended.

> - Git: There are some Git clients for Windows. For example:

>   - The official Git package

>   - TortoiseGit

>   - Git for Windows

>   - GitHub Desktop

## 12.3.2.3.2. Checkout Groonga from the repository

Users use released source archive. But developers must build Groonga at the repository. Because source code in the repository is the latest.

The Groonga repository is hosted on GitHub. Checkout the latest source code from the repository:

    > git clone --recursive git@github.com:groonga/groonga.git

## 12.3.2.3.3. Run `cmake`

You need to create `Makefile` for your environment.

You can custom your build configuration by passing options to `cmake`.

You must to pass `-G` option. Here are available `-G` value:

> - `"Visual Studio 12 2013"`: For 32bit build.

> - `"Visual Studio 12 2013 Win64"`: For 64bit build.

Here are recommended `cmake` options for developers:

    > cmake . -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=C:\Groonga -DGRN_WITH_MRUBY=on

Here are descriptions of these options:

`-G "Visual Studio 12 2013 Win64"`

`-DCMAKE_INSTALL_PREFIX=C:\Groonga`

> It specifies that you install your Groonga into `C:\\Groonga` folder.

`-DGRN_WITH_MRUBY=on`

> It enables mruby support. The feature isn’t enabled by default but developers should enable the feature.

## 12.3.2.3.4. Build Groonga

Now, you can build Groonga.

You can use Visual Studio or `cmake --build`.

Here is a command line to build Groonga by `cmake --build`:

    > cmake --build . --config Debug

## 12.3.2.3.5. See also

> - テスト方法

previous

12.3.2.2. How to build Groonga at the repository by CMake on GNU/Linux or Unix

next

12.3.3. Groonga 通信アーキテクチャ