Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Labyrus patch for build on OS X
diff --git a/Client/Client.pro b/Client/Client.pro
index b05a8fa..978a42b 100644
--- a/Client/Client.pro
+++ b/Client/Client.pro
@@ -12,7 +12,8 @@ QT += opengl
LIBS += -L/usr/lib/qt
-unix: LIBS += -lGLU
+unix:!macx: LIBS += -lGLU
+macx: LIBS += -framework OpenGL
TARGET = Client
TEMPLATE = app
diff --git a/Client/drawgl.cpp b/Client/drawgl.cpp
index 5389128..4f55661 100644
--- a/Client/drawgl.cpp
+++ b/Client/drawgl.cpp
@@ -1,6 +1,10 @@
#include "drawgl.h"
#include <QtOpenGL/QGLWidget>
-#include <GL/glu.h>
+#ifdef Q_OS_MAC
+# include <OpenGL/glu.h>
+#else
+# include <GL/glu.h>
+#endif
DrawGl::DrawGl(QApplication *app, QString skin, double mouse, QWidget *parent) :
QGLWidget(parent)
diff --git a/Client/drawgl.h b/Client/drawgl.h
index b78b9bd..e16f0ee 100644
--- a/Client/drawgl.h
+++ b/Client/drawgl.h
@@ -3,7 +3,11 @@
#include <QGLWidget>
#include <mainwindow.h>
-#include <GL/glu.h>
+#ifdef Q_OS_MAC
+# include <OpenGL/glu.h>
+#else
+# include <GL/glu.h>
+#endif
#include <QImage>
#include <QPixmap>
#include <messagesstack.h>
diff --git a/Client/model.h b/Client/model.h
index 442f5eb..053091e 100644
--- a/Client/model.h
+++ b/Client/model.h
@@ -2,7 +2,11 @@
#define MODEL_H
#include <QString>
-#include <GL/gl.h>
+#ifdef Q_OS_MAC
+# include <OpenGL/gl.h>
+#else
+# include <GL/gl.h>
+#endif
#include <stdio.h>
#include <QDebug>
#include <assert.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.