From 5f45047fb67c2147c6a1b1798b98d401e7998b51 Mon Sep 17 00:00:00 2001 From: Peter Kristensen Date: Sat, 3 Apr 2021 16:03:37 +0200 Subject: [PATCH] Update example makefiles to check the new homebrew paths (#4003) Homebrew on Apple Silicon (i.e. Macbook Air/Pro M1) use `/opt/homebrew` instead of /usr/local. --- examples/example_glfw_metal/Makefile | 5 +++-- examples/example_glfw_opengl2/Makefile | 4 ++-- examples/example_glfw_opengl3/Makefile | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/example_glfw_metal/Makefile b/examples/example_glfw_metal/Makefile index 8f08b9657..a174bc8f2 100644 --- a/examples/example_glfw_metal/Makefile +++ b/examples/example_glfw_metal/Makefile @@ -14,9 +14,10 @@ SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore -LIBS += -L/usr/local/lib -lglfw +LIBS += -L/usr/local/lib -L/opt/homebrew/lib +LIBS += -lglfw -CXXFLAGS = -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include +CXXFLAGS = -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include CXXFLAGS += -Wall -Wformat CFLAGS = $(CXXFLAGS) diff --git a/examples/example_glfw_opengl2/Makefile b/examples/example_glfw_opengl2/Makefile index 720a403c3..5c19a27f1 100644 --- a/examples/example_glfw_opengl2/Makefile +++ b/examples/example_glfw_opengl2/Makefile @@ -41,11 +41,11 @@ endif ifeq ($(UNAME_S), Darwin) #APPLE ECHO_MESSAGE = "Mac OS X" LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo - LIBS += -L/usr/local/lib -L/opt/local/lib + LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib #LIBS += -lglfw3 LIBS += -lglfw - CXXFLAGS += -I/usr/local/include -I/opt/local/include + CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include CFLAGS = $(CXXFLAGS) endif diff --git a/examples/example_glfw_opengl3/Makefile b/examples/example_glfw_opengl3/Makefile index cfa31cd68..15eb72a22 100644 --- a/examples/example_glfw_opengl3/Makefile +++ b/examples/example_glfw_opengl3/Makefile @@ -80,11 +80,11 @@ endif ifeq ($(UNAME_S), Darwin) #APPLE ECHO_MESSAGE = "Mac OS X" LIBS += -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo - LIBS += -L/usr/local/lib -L/opt/local/lib + LIBS += -L/usr/local/lib -L/opt/local/lib -L/opt/homebrew/lib #LIBS += -lglfw3 LIBS += -lglfw - CXXFLAGS += -I/usr/local/include -I/opt/local/include + CXXFLAGS += -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include CFLAGS = $(CXXFLAGS) endif