Skip to content

Commit 7d55719

Browse files
committed
Allow building for macOS
1 parent 5d7b639 commit 7d55719

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

platform/desktop/platform.mk

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
PKGS += gl glib-2.0
1+
PKGS += glib-2.0
2+
3+
ifeq ($(shell uname),Darwin)
4+
LIBS += -framework OpenGL
5+
else
6+
PKGS += gl
7+
endif
28

39
install: $(TARGET)
410
install -m755 -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)

src/Config.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
#define BRAINPARTY_CONFIG_H
33

44
#if defined(USE_OPENGL_ES)
5-
#include <GLES/gl.h>
5+
# include <GLES/gl.h>
66
#else
7-
#include <GL/gl.h>
8-
#define glOrthof glOrtho
7+
# if defined(__APPLE__)
8+
# include <OpenGL/gl.h>
9+
# else
10+
# include <GL/gl.h>
11+
# endif
12+
# define glOrthof glOrtho
913
#endif
1014

1115
#include "SDL.h"

0 commit comments

Comments
 (0)