fix compiling error on OSX

error: ld: library not found for -lglfw3
This commit is contained in:
jwdeitch 2017-08-17 00:28:03 -04:00
parent 2a406caf7f
commit 52f24d4e67
2 changed files with 6 additions and 4 deletions

View File

@ -12,10 +12,11 @@ BIN := $(BIN).exe
LIBS = -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32
else
UNAME_S := $(shell uname -s)
GLFW3 := $(shell pkg-config --libs glfw3)
ifeq ($(UNAME_S),Darwin)
LIBS := -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
else
LIBS = -lglfw -lGL -lm -lGLU -lGLEW
LIBS = $(GLFW3) -lGL -lm -lGLU -lGLEW
endif
endif

View File

@ -7,11 +7,12 @@ BIN := $(BIN).exe
LIBS := -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32
else
UNAME_S := $(shell uname -s)
GLFW3 := $(shell pkg-config --libs glfw3)
ifeq ($(UNAME_S),Darwin)
LIBS := -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
CFLAGS += -I/usr/local/include
else
LIBS := -lglfw -lGL -lm -lGLU -lGLEW
LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW
endif
endif