File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -351,16 +351,18 @@ endif
351
351
352
352
# test for presence of SDL
353
353
ifeq ($(origin SDL_CFLAGS ) $(origin SDL_LDLIBS ) , undefined undefined)
354
- SDL_CONFIG = $(CROSS_COMPILE ) sdl2-config
355
- ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null), )
356
- $(error No SDL development libraries found!)
357
- else
358
- ifeq ($(NETPLAY), 1 )
359
- SDL_LDLIBS += -lSDL2_net
354
+ ifeq ($(shell $(PKG_CONFIG) --modversion sdl2 2>/dev/null),)
355
+ $(error No SDL2 development libraries found! )
356
+ endif
357
+ ifeq ($(NETPLAY), 1)
358
+ ifeq ($(shell $(PKG_CONFIG) --modversion SDL2_net 2>/dev/null), )
359
+ $(error No SDL2_net development libraries found!)
360
360
endif
361
+ SDL_CFLAGS += $(shell $(PKG_CONFIG ) --cflags SDL2_net)
362
+ SDL_LDLIBS += $(shell $(PKG_CONFIG ) --libs SDL2_net)
361
363
endif
362
- SDL_CFLAGS += $(shell $(SDL_CONFIG ) --cflags)
363
- SDL_LDLIBS += $(shell $(SDL_CONFIG ) --libs)
364
+ SDL_CFLAGS += $(shell $(PKG_CONFIG ) --cflags sdl2 )
365
+ SDL_LDLIBS += $(shell $(PKG_CONFIG ) --libs sdl2 )
364
366
endif
365
367
CFLAGS += $(SDL_CFLAGS )
366
368
LDLIBS += $(SDL_LDLIBS )
You can’t perform that action at this time.
0 commit comments