Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ruby/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ ifeq ($(ruby),)
ruby += input.quartz #input.carbon
ifeq ($(sdl2),true)
macsdl = ../thirdparty/SDL/libSDL2-2.0.0.dylib
ares.dylibs += $(macsdl)
ifeq ($(wildcard $(macsdl)),)
$(error Tried to compile ruby for macOS with SDL2 linked, but no SDL2 library was found. Compile it with thirdparty/SDL/build-sdl.sh, or disable SDL by compiling ares with sdl2=false)
ifeq ($(local),true)
sdl2prefix = $(shell brew --prefix sdl2)
ifneq ($(sdl2prefix),)
macsdl = $(sdl2prefix)/lib/libSDL2-2.0.0.dylib
endif
endif
endif
ifeq ($(wildcard $(macsdl)),)
$(error Tried to compile ruby for macOS with SDL2 linked, but no SDL2 library was found. Install it with homebrew, or compile it with thirdparty/SDL/build-sdl.sh, or disable SDL by compiling ares with sdl2=false)
endif
ares.dylibs += $(macsdl)
ruby += input.sdl
endif
else ifeq ($(platform),linux)
Expand Down