Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/i8degrees/nomlib

C++11 2D game framework using SDL2
https://github.com/i8degrees/nomlib

c-plus-plus cmake game-engine gamedev sdl ttcards universal visual-studio

Last synced: about 1 month ago
JSON representation

C++11 2D game framework using SDL2

Awesome Lists containing this project

README

        

# nomlib

[![Build Status](https://travis-ci.org/i8degrees/nomlib.png?branch=master,dev)](https://travis-ci.org/i8degrees/nomlib)

C++11 2D game framework using SDL2

## Projects Using nomlib

* [i8degrees/ttcards](https://github.com/i8degrees/ttcards)

## Building

First, ensure that you have the following core dependencies installed:

* [cmake v2.8.12+](http://www.cmake.org/)
* [git](http://git-scm.com/download/)
* [doxygen v1.8.x](http://www.stack.nl/~dimitri/doxygen/) and [graphviz](http://www.graphviz.org/) only if you want to generate developer documentation.

Next, you should visit the dependencies section for your platform. After these mundane chores are complete, you should be ready to start the building process for your platform!

### Mac OS X

After you have the dependencies taken care of, execute the following commands at your terminal prompt:

```
git clone https://github.com/i8degrees/nomlib
cd nomlib
mkdir build && cd build
# XCode project files can be generated by passing -GXcode
cmake -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=off -DNOM_BUILD_TESTS=on -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_INSTALL_PREFIX=~/Library/Frameworks ..
make
make test
make install
```

Upon a successful build, you should have the library modules built as OS X framework bundles, installed wherever CMAKE_INSTALL_PREFIX was set to.

### Linux

Linux builds are broken at the moment.

~~Until I get around to writing the proper instructions, you may take a look at my
.travis.yml build script in the project root of nomlib for hints!~~

### Windows

**NOTE:** Alpha build quality. This has only been tested on MS Windows 7.

After you have the dependencies taken care of, execute the following commands at the DOS prompt:

```
git clone https://github.com/i8degrees/nomlib
cd nomlib
mkdir build && cd build
cmake -G"Visual Studio 12" -DARCH_32=on -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=off -DNOM_BUILD_TESTS=on ..
```

Upon a successful generation, you should have populated your current build directory with several Visual Studio project files -- **nomlib.vcxproj** is the top-level solution.

### Project Options

Build options are passed to cmake with the -D option. For example, to change the installation prefix:

```
cmake -D CMAKE_INSTALL_PREFIX=~/Library/Frameworks ..
```

- Installation path: -D CMAKE_INSTALL_PREFIX=**\**
* Defaults to your current **build** directory

- Documentation: -D DOCS=**\**
* Defaults to **OFF**
* When built (**ON**), the resulting documentation will reside in a new directory named **docs**

- Examples: -D EXAMPLES=**\**
* Defaults to **OFF**
* When built (**ON**), the resulting binaries will reside in a new directory named **examples**

- Debugging: -D DEBUG=**\** -D DEBUG_ASSERT=**\**
* Defaults to **OFF**

- Universal binary: -D UNIVERSAL=**\**
* Defaults to **OFF**

Removal is provided by executing **make uninstall** within your current build directory.

**IMPORTANT:** If you are building multiple target types with the generated MSVCPP or Xcode project files, each of these targets **must** be kept in separate build directories!

## Mac OS X Dependencies

Required OS X version: 10.7

See **third-party/README.md** for where to obtain pre-packaged libraries and how to install them.

## Microsoft Windows Dependencies

Required version: Microsoft Windows Vista

**NOTE**: This has not been verified.

See **third-party/README.md** for where to obtain pre-packaged libraries and how to install them.

* [Microsoft Visual Studio Express 2013 for Windows](http://www.microsoft.com/visualstudio/eng#downloads)

- Required software tools in your system PATH
* MSVSCPP -- **\\bin**
* CMake -- **\\bin**
* Git -- **\\bin**

If this is your first time installing the tools, you might be happy to know that the official installers can do this task for you automatically.