premake4 build: allow to dynamically load X11 if X11 system headers/library is missing

premake4 build: allow to dynamically load OpenGL/GLEW/glx if system headers are missing
This commit is contained in:
Erwin Coumans
2014-08-18 21:43:08 -07:00
parent 670576ec72
commit bf1bd07636
40 changed files with 15811 additions and 124 deletions

View File

@@ -16,20 +16,18 @@ subject to the following restrictions:
#define GLUT_STUFF_H
#ifdef DONT_USE_GLUT
#ifdef _WIN32//for glut.h
#include <windows.h>
#endif
#endif //DONT_USE_GLUT
#include "OpenGLWindow/OpenGLInclude.h"
#define BT_ACTIVE_ALT 8192
#define BT_ACTIVE_SHIFT 8193
#define BT_ACTIVE_CTRL 8194
#else //DONT_USE_GLUT
//think different
#if defined(__APPLE__) && !defined (VMDMESA)
#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#ifndef DONT_USE_GLUT
#include <GLUT/glut.h>
#endif//DONT_USE_GLUT
#include <GLUT/glut.h>
#else//(__APPLE__) && !defined (VMDMESA)
@@ -39,17 +37,12 @@ subject to the following restrictions:
#include <GL/glu.h>
#else //_WINDOWS
#ifdef DONT_USE_GLUT
#include <GL/gl.h>
#include <GL/glu.h>
#else//DONT_USE_GLUT
#ifdef _WIN32
#include <windows.h>
#endif//_WIN32
#include <GL/gl.h>
#include <GL/glut.h>
#ifdef _WIN32
#include <windows.h>
#endif//_WIN32
#include <GL/gl.h>
#include <GL/glut.h>
#endif//DONT_USE_GLUT
#endif//_WINDOWS
#endif //(__APPLE__) && !defined (VMDMESA)
@@ -58,11 +51,6 @@ subject to the following restrictions:
#define BT_ACTIVE_SHIFT VK_LSHIFT
#define BT_ACTIVE_CTRL VK_LCONTROL
#else //_WINDOWS
#ifdef DONT_USE_GLUT
#define BT_ACTIVE_ALT 8192
#define BT_ACTIVE_SHIFT 8193
#define BT_ACTIVE_CTRL 8194
#else//DONT_USE_GLUT
#define BT_KEY_K 'k'
#define BT_KEY_LEFT GLUT_KEY_LEFT
#define BT_KEY_RIGHT GLUT_KEY_RIGHT
@@ -81,12 +69,10 @@ subject to the following restrictions:
#define BT_ACTIVE_CTRL GLUT_ACTIVE_ALT
#define BT_ACTIVE_SHIFT GLUT_ACTIVE_SHIFT
#endif
#endif
#if BT_USE_FREEGLUT
#include "GL/freeglut_ext.h" //to be able to return from glutMainLoop()
#endif
#endif // DONT_USE_GLUT
class DemoApplication;