mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-20 23:53:44 +08:00
committed by
Comma Device
parent
0094c9ac06
commit
cbd22eca29
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"/../../third_party/libspatialindex
|
||||
|
||||
ARCHNAME=$(uname -m)
|
||||
if [ -f /TICI ]; then
|
||||
ARCHNAME="larch64"
|
||||
fi
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
ARCHNAME="Darwin"
|
||||
fi
|
||||
|
||||
cd $DIR
|
||||
|
||||
if [ ! -d libspatialindex ]; then
|
||||
git clone --single-branch https://github.com/libspatialindex/libspatialindex
|
||||
fi
|
||||
|
||||
cd libspatialindex
|
||||
|
||||
# build
|
||||
rm -fr build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . -j$(nproc)
|
||||
|
||||
rm -fr $DIR/$ARCHNAME
|
||||
mkdir -p $DIR/$ARCHNAME
|
||||
|
||||
make install DESTDIR=$DIR/$ARCHNAME
|
||||
|
||||
# clean up
|
||||
rm -fr $DIR/libspatialindex/
|
||||
mv $DIR/$ARCHNAME/usr/local/* $DIR/$ARCHNAME
|
||||
rm -fr $DIR/$ARCHNAME/usr/
|
||||
rm -fr $DIR/$ARCHNAME/lib/cmake/
|
||||
rm -fr $DIR/$ARCHNAME/lib/pkgconfig/
|
||||
Reference in New Issue
Block a user