build.sh: don't fail if we can't find libusb or hidapi

Also remove a left behind debug printout.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-07-15 21:59:31 -07:00
parent 20f5609a6c
commit dd1bdd3f81

View file

@ -230,9 +230,8 @@ if [[ $PLATFORM = Darwin || "$LIBGIT" < "24" ]] ; then
# we are getting libusb and hidapi from pkg-config and that goes wrong
# or more specifically, the way libdivecomputer references
# the include files goes wrong
LIBDC_CFLAGS=-I$(dirname $(pkg-config --cflags libusb-1.0 | sed -e 's/^-I//'))
LIBDC_CFLAGS="${LIBDC_CFLAGS} -I$(dirname $(pkg-config --cflags hidapi | sed -e 's/^-I//'))"
echo $LIBDC_CFLAGS
pkg-config --exists libusb-1.0 && LIBDC_CFLAGS=-I$(dirname $(pkg-config --cflags libusb-1.0 | sed -e 's/^-I//'))
pkg-config --exists hidapi && LIBDC_CFLAGS="${LIBDC_CFLAGS} -I$(dirname $(pkg-config --cflags hidapi | sed -e 's/^-I//'))"
fi
LIBGIT_ARGS=" -DLIBGIT2_INCLUDE_DIR=$INSTALL_ROOT/include -DLIBGIT2_LIBRARIES=$INSTALL_ROOT/lib/libgit2.$SH_LIB_EXT "