File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,14 @@ ifeq ($(OS), OSX)
137137 endif
138138endif
139139
140+ # test for essential build dependencies
141+ ifeq ($(origin PKG_CONFIG ) , undefined)
142+ PKG_CONFIG = $(CROSS_COMPILE ) pkg-config
143+ ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
144+ $(error $(PKG_CONFIG) not found)
145+ endif
146+ endif
147+
140148ifeq ($(OS ) , LINUX)
141149 HIDAPI_NAME =hidapi-hidraw
142150else
@@ -145,9 +153,9 @@ endif
145153
146154# test for presence of HIDLIB
147155ifeq ($(origin HID_CFLAGS ) $(origin HID_LDLIBS ) , undefined undefined)
148- HIDAPI_CONFIG = $(CROSS_COMPILE ) pkg-config $(HIDAPI_NAME )
156+ HIDAPI_CONFIG = $(PKG_CONFIG ) $(HIDAPI_NAME )
149157 ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
150- HIDAPI_CONFIG = $(CROSS_COMPILE ) pkg-config $(HIDAPI_NAME )
158+ HIDAPI_CONFIG = $(PKG_CONFIG ) $(HIDAPI_NAME )
151159 ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),)
152160 $(error No HIDAPI development libraries found!)
153161 else
You can’t perform that action at this time.
0 commit comments