Skip to content

Commit cc1b640

Browse files
committed
mupen64plus-input-raphnetraw: don't hard-code pkg-config
Upstream-PR: raphnet/mupen64plus-input-raphnetraw#17
1 parent 9cae93b commit cc1b640

File tree

1 file changed

+10
-2
lines changed
  • Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix

1 file changed

+10
-2
lines changed

Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ ifeq ($(OS), OSX)
141141
endif
142142
endif
143143

144+
# test for essential build dependencies
145+
ifeq ($(origin PKG_CONFIG), undefined)
146+
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
147+
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
148+
$(error $(PKG_CONFIG) not found)
149+
endif
150+
endif
151+
144152
ifeq ($(OS), LINUX)
145153
HIDAPI_NAME=hidapi-hidraw
146154
else
@@ -149,9 +157,9 @@ endif
149157

150158
# test for presence of HIDLIB
151159
ifeq ($(origin HID_CFLAGS) $(origin HID_LDLIBS), undefined undefined)
152-
HIDAPI_CONFIG = $(CROSS_COMPILE)pkg-config $(HIDAPI_NAME)
160+
HIDAPI_CONFIG = $(PKG_CONFIG) $(HIDAPI_NAME)
153161
ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
154-
HIDAPI_CONFIG = $(CROSS_COMPILE)pkg-config $(HIDAPI_NAME)
162+
HIDAPI_CONFIG = $(PKG_CONFIG) $(HIDAPI_NAME)
155163
ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
156164
$(error No HIDAPI development libraries found!)
157165
else

0 commit comments

Comments
 (0)