Skip to content

Commit

Permalink
3rdParty: improve the hidapi check in mupen64plus-input-raphnetraw
Browse files Browse the repository at this point in the history
Better matches the style in mupen64plus-core.

Upstream-PR: raphnet/mupen64plus-input-raphnetraw#17
  • Loading branch information
orbea committed Oct 21, 2024
1 parent e68483f commit 644b290
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,11 @@ endif

# test for presence of HIDLIB
ifeq ($(origin HID_CFLAGS) $(origin HID_LDLIBS), undefined undefined)
HIDAPI_CONFIG = $(PKG_CONFIG) $(HIDAPI_NAME)
ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
HIDAPI_CONFIG = $(PKG_CONFIG) $(HIDAPI_NAME)
ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
$(error No HIDAPI development libraries found!)
else
$(warning Using HIDAPI libraries)
endif
ifeq ($(shell $(PKG_CONFIG) --modversion $(HIDAPI_NAME) 2>/dev/null),)
$(error No HIDAPI development libraries found!)
endif
HID_CFLAGS += $(shell $(HIDAPI_CONFIG) --cflags)
HID_LDLIBS += $(shell $(HIDAPI_CONFIG) --libs)
HID_CFLAGS = $(shell $(PKG_CONFIG) --cflags $(HIDAPI_NAME))
HID_LDLIBS = $(shell $(PKG_CONFIG) --libs $(HIDAPI_NAME))
endif
CFLAGS += $(HID_CFLAGS)
LDLIBS += $(HID_LDLIBS)
Expand Down

0 comments on commit 644b290

Please sign in to comment.