Add HIDAPI to build dependencies

pull/26/head
nirenjan 2020-07-05 16:19:04 -07:00
parent 1cbad472df
commit bcc90ac24e
2 changed files with 9 additions and 1 deletions

View File

@ -37,14 +37,17 @@ addons:
- autopoint - autopoint
- faketime - faketime
- libcmocka-dev - libcmocka-dev
- libhidapi-dev
homebrew: homebrew:
packages: packages:
- libusb - libusb
- gettext - gettext
- cmocka
- hidapi
# Ensure that build dependencies are available on OSX # Ensure that build dependencies are available on OSX
before_script: before_script:
- if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libusb gettext cmocka ; fi - if [ "$TRAVIS_OS_NAME" = osx ]; then brew install libusb gettext cmocka hidapi; fi
# Enable parallel make # Enable parallel make
env: env:

View File

@ -44,6 +44,11 @@ AC_SUBST([LIBUSB_LIBS])
AC_SUBST([X52_PKG_VERSION], [0.1]) AC_SUBST([X52_PKG_VERSION], [0.1])
AC_SUBST([X52_INCLUDE], ["-I \$(top_srcdir)/lib/libx52"]) AC_SUBST([X52_INCLUDE], ["-I \$(top_srcdir)/lib/libx52"])
# Check for hidapi. This uses a different pkg-config file on Linux vs other
# hosts, so check accordingly
AM_COND_IF([LINUX], [hidapi_backend=hidapi-hidraw], [hidapi_backend=hidapi])
AX_PKG_CHECK_MODULES([HIDAPI], [${hidapi_backend}], [], [have_hidapi=yes], [have_hidapi=no])
# Check for pthreads # Check for pthreads
ACX_PTHREAD ACX_PTHREAD