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.
This commit is contained in:
Peter Kristensen 2021-04-03 16:03:37 +02:00 committed by ocornut
parent 71dda216ef
commit 5f45047fb6
3 changed files with 7 additions and 6 deletions

View File

@ -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)

View File

@ -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

View File

@ -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