Skip to content

Commit

Permalink
Use System SDL2 As Failsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
mr sihc authored and username00112233 committed Dec 4, 2023
1 parent a016b4d commit 84f22a1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
INCLUDE_PATHS += -I$(SDL_INCLUDE_PATH)
# If on a platfrom with shell support, use pkg-confg to find dir if SDL_INCLUDE_PATH doesn't exist
ifeq ($(PLATFORM_OS),$(filter $(PLATFORM_OS),LINUX BSD OSX))
ifeq ($(shell if [ ! -d "$(SDL_INCLUDE_PATH)" ]; then echo 1; else echo 0; fi), 1)
INCLUDE_PATHS += $(shell pkg-config --cflags sdl2)
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
INCLUDE_PATHS += -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
Expand Down Expand Up @@ -499,6 +505,12 @@ endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
LDFLAGS += -L$(SDL_LIBRARY_PATH)
# If on a platfrom with shell support, use pkg-config to find dir if SDL_LIBRARY_PATH doesn't exist
ifeq ($(PLATFORM_OS),$(filter $(PLATFORM_OS),LINUX BSD OSX))
ifeq ($(shell if [ ! -d "$(SDL_LIBRARY_PATH)" ]; then echo 1; else echo 0; fi), 1)
LDFLAGS += $(shell pkg-config --libs sdl2)
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
Expand Down

0 comments on commit 84f22a1

Please sign in to comment.