aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-16 21:11:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-16 21:11:44 -0700
commit6586438bf6ba3157e958c03d150aefbeb1a2e98d (patch)
treeebbe4d0053c159f1a507f15ef5208bea916bfb78 /scripts
parent86396e9904f18e2379689ce4d7f83a88dc3016d1 (diff)
downloadsubsurface-6586438bf6ba3157e958c03d150aefbeb1a2e98d.tar.gz
build-system: improve finding of libdivecomputer.a
On some systems it ends up in lib64 instead of lib. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index cc83eeccb..4c2fd8acb 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -449,6 +449,8 @@ if [ "$PLATFORM" = Darwin ] ; then
fi
make -j4
make install
+# make sure we know where the libdivecomputer.a was installed - sometimes it ends up in lib64, sometimes in lib
+STATIC_LIBDC="$INSTALL_ROOT/$(grep ^libdir Makefile | cut -d/ -f2)/libdivecomputer.a"
if [ "$PLATFORM" = Darwin ] ; then
if [ -z "$CMAKE_PREFIX_PATH" ] ; then
@@ -530,7 +532,7 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
-DSUBSURFACE_TARGET_EXECUTABLE="$SUBSURFACE_EXECUTABLE" \
"$LIBGIT_ARGS" \
-DLIBDIVECOMPUTER_INCLUDE_DIR="$INSTALL_ROOT"/include \
- -DLIBDIVECOMPUTER_LIBRARIES="$INSTALL_ROOT"/lib/libdivecomputer.a \
+ -DLIBDIVECOMPUTER_LIBRARIES="$STATIC_LIBDC" \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
-DBTSUPPORT="$BTSUPPORT" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" \