aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-07 10:26:31 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-07 11:32:43 -0700
commit2de5b95acf65cf67db43783b9d308bd097fd7141 (patch)
tree02e63eb63f4be62e4d1c9e27201b5a9030a9a9ed
parent5c403edf795cadc8416d6dd86c0248741c86506d (diff)
downloadsubsurface-2de5b95acf65cf67db43783b9d308bd097fd7141.tar.gz
build-system/macOS: don't get libgit2 from pkgconfig when building it ourselves
Doing that confuses the build setup and as a result the library isn't found at runtime without some fixups. Fixes #1469 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-xscripts/build.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 64a86b802..101330956 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -177,7 +177,12 @@ fi
# set up the right file name extensions
if [ $PLATFORM = Darwin ] ; then
SH_LIB_EXT=dylib
- pkg-config --exists libgit2 && LIBGIT=$(pkg-config --modversion libgit2 | cut -d. -f2)
+ if [ ! "$BUILD_DEPS" == "1" ] ; then
+ pkg-config --exists libgit2 && LIBGIT=$(pkg-config --modversion libgit2 | cut -d. -f2)
+ if [[ "$LIBGIT" > "23" ]] ; then
+ LIBGIT2_FROM_PKGCONFIG="-DLIBGIT2_FROM_PKGCONFIG=ON"
+ fi
+ fi
else
SH_LIB_EXT=so
@@ -187,6 +192,7 @@ else
# this script has been run before)
if pkg-config --exists libgit2 ; then
LIBGIT=$(pkg-config --modversion libgit2 | cut -d. -f2)
+ LIBGIT2_FROM_PKGCONFIG="-DLIBGIT2_FROM_PKGCONFIG=ON"
fi
if [[ "$LIBGIT" < "24" ]] ; then
# maybe there's a system version that's new enough?
@@ -464,7 +470,7 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH \
-DBTSUPPORT=${BTSUPPORT} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT} \
- -DLIBGIT2_FROM_PKGCONFIG=ON \
+ $LIBGIT2_FROM_PKGCONFIG \
-DFORCE_LIBSSH=OFF \
$PRINTING $EXTRA_OPTS