From 4e8b9c2fa38e43e48d2731b460cc30eb7cfdb911 Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 6 Oct 2016 23:46:48 -0400 Subject: [PATCH] OSX build options --- GLFT_Font.hpp | 4 ++++ Makefile | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/GLFT_Font.hpp b/GLFT_Font.hpp index 6b0782e..0ddac20 100644 --- a/GLFT_Font.hpp +++ b/GLFT_Font.hpp @@ -39,7 +39,11 @@ #ifndef GLFT_FONT_HPP #define GLFT_FONT_HPP +#ifdef __APPLE__ +#include +#else #include +#endif #include #include FT_FREETYPE_H diff --git a/Makefile b/Makefile index a9237e7..42077dc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ +UNAME := $(shell uname) + +ifeq ($(UNAME), Darwix) + GL := -framework OpenGL +else + GL := -lGL -lXrandr +endif + test: test.cpp GLFT_Font.cpp - g++ GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw -lGL -lfreetype -pthread -lXrandr `freetype-config --cflags` + g++ GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw $(GL) -lfreetype -pthread `freetype-config --cflags` glftfont.tar.gz: tar -czf glftfont.tar.gz GLFT_Font.cpp GLFT_Font.hpp index.html README test.cpp Makefile