From 7180a5b9a23bd3992649e7fcb4463825d27e4e2b Mon Sep 17 00:00:00 2001 From: dragonmux Date: Sat, 11 Jun 2022 19:03:06 -0400 Subject: [PATCH] hosted: Fixed issues finding and linking HIDAPI on MacOS --- src/platforms/hosted/Makefile.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/hosted/Makefile.inc b/src/platforms/hosted/Makefile.inc index 907b23a..2502539 100644 --- a/src/platforms/hosted/Makefile.inc +++ b/src/platforms/hosted/Makefile.inc @@ -40,9 +40,9 @@ LDFLAGS += -lsetupapi #https://github.com/dmlc/xgboost/issues/1945 indicates macosx as indicator else ifneq (filter, macosx darwin, $(SYS)) SRC += serial_unix.c -LDFLAGS += -lhidapi +LDFLAGS += $(pkg-config --libs hidapi) LDFLAGS += -framework CoreFoundation -CFLAGS += -Ihidapi/hidapi +CFLAGS += -Ihidapi/hidapi $(pkg-config --cflags hidapi) HIDAPILIB = hidapi endif