package.sh: Don't pass -B option to cmake

Older versions of cmake don't support this.
This commit is contained in:
Tom Stellard 2021-06-06 10:08:19 -07:00 committed by Tom Stellard
parent 8b38034e15
commit 2bd484d69c
1 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@
set -ex
srcdir=$1
srcdir=`realpath $1`
version="2.3.3"
@ -12,13 +12,20 @@ fi
builddir=./build-$version
installdir=./bygfoot-$version
installdir_abs=`realpath $installdir`
mkdir -p $builddir
mkdir -p $installdir
cmake -G Ninja -B $builddir -S $srcdir -DCMAKE_INSTALL_PREFIX=$installdir -DCMAKE_C_FLAGS=-DVERS=\"\\\"$version\\\"\"
# Don't use the -B option here, because some older versions of
# cmake don't support it.
pushd $builddir
cmake -G Ninja -S $srcdir -DCMAKE_INSTALL_PREFIX=$installdir_abs -DCMAKE_C_FLAGS=-DVERS=\"\\\"$version\\\"\"
popd
ninja -v -C $builddir install
# Fixup install dir so that bygfoot can find the support
# files.