Browse Source

(#146) Apply @zhiayang's solution to the failing MacOS build

rexim 5 years ago
parent
commit
2b20b75bdc
2 changed files with 5 additions and 0 deletions
  1. 4 0
      Makefile
  2. 1 0
      src/vodus.cpp

+ 4 - 0
Makefile

@@ -7,7 +7,11 @@ VODUS_EXTRA_CXXFLAGS += -DVODUS_SSE -msse4
 endif
 
 # TODO(#87): we need an option to build with system libraries
+ifeq ($(UNAME), Darwin)
+VODUS_PKGS=freetype2 libpcre2-8 glfw3
+else
 VODUS_PKGS=freetype2 libpcre2-8 glfw3 gl
+endif
 VODUS_CXXFLAGS=-Wall -fno-exceptions -std=c++17 $(VODUS_EXTRA_CXXFLAGS) -ggdb `pkg-config --cflags $(VODUS_PKGS)` -I./third_party/ffmpeg-4.3-dist/usr/local/include/ -I./third_party/giflib-5.2.1-dist/usr/local/include/
 VODUS_LIBS=`pkg-config --libs $(VODUS_PKGS)` -L./third_party/giflib-5.2.1-dist/usr/local/lib/ ./third_party/giflib-5.2.1-dist/usr/local/lib/libgif.a -L./third_party/ffmpeg-4.3-dist/usr/local/lib/ -L./third_party/glfw-3.3.2-dist/usr/local/lib/ -lavcodec -lavutil -lswresample -pthread -lm -llzma -lz -ldl
 

+ 1 - 0
src/vodus.cpp

@@ -38,6 +38,7 @@ using namespace aids;
 #include <smmintrin.h>
 #endif // VODUS_SSE
 
+#define GLFW_INCLUDE_GLCOREARB
 #define GL_GLEXT_PROTOTYPES
 #include <GLFW/glfw3.h>