summaryrefslogtreecommitdiffstats
path: root/scripts/build.sh
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-15 21:59:31 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-15 21:59:31 -0700
commitdd1bdd3f8110a74306538ad5c952769f82adf6ba (patch)
tree53f5f66794da616cdcbf62536baafe79287d926d /scripts/build.sh
parent20f5609a6c1c9717ffe04d51f764f03ec95ceaa1 (diff)
downloadsubsurface-dd1bdd3f8110a74306538ad5c952769f82adf6ba.tar.gz
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>
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 72d8542b3..7701b9c60 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -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 "