From 56d18a5f95acd39d943b98881bbbde2cb24dedad Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 10 Feb 2022 18:06:59 -0800 Subject: [PATCH] Fix OSX's include path for sdl-config --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b80338b..bf3ed1cb 100644 --- a/Makefile +++ b/Makefile @@ -635,7 +635,13 @@ else ifeq ($(SDL1_USED),1) endif ifneq ($(SDL1_USED)$(SDL2_USED),00) - BACKEND_CFLAGS += `$(SDLCONFIG) --cflags` + ifeq ($(OSX_BUILD),1) + # on OSX at least the homebrew version of sdl-config gives include path as `.../include/SDL2` instead of `.../include` + OSX_PREFIX := $(shell $(SDLCONFIG) --prefix) + BACKEND_CFLAGS += -I$(OSX_PREFIX)/include $(shell $(SDLCONFIG) --cflags) + else + BACKEND_CFLAGS += `$(SDLCONFIG) --cflags` + endif ifeq ($(WINDOWS_BUILD),1) BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion else