Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby: try using homebrew for SDL in local builds on macOS #1390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Loading