summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index c67004bb6..2457b4c8f 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -211,6 +211,13 @@ if [[ $PLATFORM = Darwin || "$LIBGIT" < "24" ]] ; then
cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF ..
make -j4
make install
+ else
+ # 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
fi
LIBGIT_ARGS=" -DLIBGIT2_INCLUDE_DIR=$INSTALL_ROOT/include -DLIBGIT2_LIBRARIES=$INSTALL_ROOT/lib/libgit2.$SH_LIB_EXT "
@@ -276,7 +283,7 @@ if [ ! -f ../configure ] ; then
autoreconf --install ..
autoreconf --install ..
fi
-CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include" ../configure --prefix=$INSTALL_ROOT --disable-examples
+CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include $LIBDC_CFLAGS" ../configure --prefix=$INSTALL_ROOT --disable-examples
make -j4
make install