gavanw / voxelquestiso

First version of the Voxel Quest engine (isometric)
MIT License
361 stars 40 forks source link

Enable cross-platform build with CMake #6

Closed ghost closed 8 years ago

ghost commented 8 years ago

Resolves #2 and #3.

This branch is still very WIP and probably needs more testing before it gets merged. I've been hacking on it in Ubuntu. I was able to get it to build and run there without any crashes, but currently getting some weird visuals which are making it mostly unplayable. However this may just be an issue with my graphics drivers. I haven't tested the CMake build on any other operating systems.

The CMake build works basically the same as the currently existing scripts do. To get it to work you'll need to download your system's version of lzz and place it in the project root.

Instructions for install on Ubuntu:

sudo apt-get install build-essential libstdc++-4.8-dev cmake \
    libgl1-mesa-dev freeglut3-dev libglew-dev libsfml-dev
git clone -b cmake https://github.com/halfspiral/voxelquestiso
cd voxelquestiso
mkdir build
cd build
cmake ..
make
./VoxelQuest
netmask commented 8 years ago

to build on apple yo also need to fix the headers in the headers file

#include <GL/glew.h>

#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/freeglut.h>
#endif

also the function glutLeaveMainLoop(); on the singleton is not available on the mac glut header :(