Skip to content
topilski edited this page Nov 3, 2014 · 3 revisions
  1. Prerequisites For All Platforms
  2. Build for Linux
    1. Simple build
    2. CMake arguments
    3. Explore output
  3. Build for Mac OS X
    1. Simple build
    2. CMake arguments
    3. Explore output
  4. Build for Windows
    1. Simple build
    2. Explore output

Prerequisites for all platforms (Windows, Linux, Mac OS X)

  1. Qt 5 — cross-platform application and UI framework. We recommend Qt 5.2 and above.
  2. CMake — cross-platform build system
  3. Boost — cross-platform library

Check that qmake, cmake and scons are in your PATH variable.

$ qmake --version
QMake version 3.0
Using Qt version 5.2.1
        
$ cmake --version
cmake version 2.8.10.1

<a name="build-for-linux"></a>
## Build for Linux

Before building Fastoredis, install `libssl-dev` package on your system.

<a name="linux-simple-build"></a>
#### Simple build

To build Fastoredis, run the following commands:
```sh
$ mkdir target
$ cd target
$ cmake ..
$ make
$ make install

We are assuming, that target folder is inside Fastoredis project's root:

/fastoredis
  /build
  /docs
  ...
  /target     <--  This folder is ignored in .gitignore
  ...

But you can specify absolute path to your /fastoredis folder:

$ cmake /home/mike/projects/fastoredis

CMake arguments:

Argument Description Default value
-DCMAKE_BUILD_TYPE Build type: Release or Debug Debug
-DOS_ARC Architecture: 32 for i386, and 64 for x86_64 (AMD64). Current CPU architecture will be used.
-DCMAKE_INSTALL_PREFIX Install location CMAKE_OUT/install

The following command will build 64-bit Fastoredis in release mode:

cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DOS_ARC=64

Explore output

In target/install you can find fastoredis executable.

Build for Mac OS X

Simple build

To build Fastoredis, run the following commands:

$ mkdir target
$ cd target
$ cmake ..
$ make
$ make install

Note.

If using a brew installed QT (or not standard library install) do this before the cmake ..

export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/VERSION(5.3.1)/lib/cmake

We are assuming, that target folder is inside Fastoredis project's root:

/fastoredis
  /build
  /docs
  ...
  /target     <--  This folder is ignored in .gitignore
  ...

But you can specify absolute path to your /fastoredis folder:

$ cmake /home/mike/projects/fastoredis

CMake arguments:

Argument Description Default value
-DCMAKE_BUILD_TYPE Build type: Release or Debug Debug
-DOS_ARC Architecture: 32 for i386, and 64 for x86_64 (AMD64). Current CPU architecture will be used.
-DCMAKE_INSTALL_PREFIX Install location CMAKE_OUT/install

The following command will build 64-bit Fastoredis in release mode:

cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DOS_ARC=64

Explore output

In target/install you can find Fastoredis executable.

Build for Windows

Prerequisites

  1. Mingw: http://sourceforge.net/projects/mingwbuilds/
  2. Build qt from sources: http://qt-project.org/wiki/Building_Qt_5_from_Git

Simple build

To build Fastoredis, run the following commands:

$ mkdir target
$ cd target
$ cmake ..
$ cmake --build . --target install --config Release

We are assuming, that target folder is inside Fastoredis project's root:

/fastoredis
  /build
  /docs
  ...
  /target     <--  This folder is ignored in .gitignore
  ...

But you can specify absolute path to your /fastoredis folder:

$ cmake "d:\Projects\Fastoredis"

Explore output

In target/install you can find Fastoredis executable.

Clone this wiki locally