1
0

32 lines
632 B
Bash
Raw Permalink Normal View History

#!/bin/bash -e
2022-11-13 17:35:33 +01:00
LEVELDB_VERSION=1.23
. scripts/sdk.sh
mkdir -p deps; cd deps
if [ ! -d leveldb-src ]; then
2022-11-13 17:35:33 +01:00
git clone -b $LEVELDB_VERSION --depth 1 https://github.com/google/leveldb leveldb-src
mkdir leveldb-src/build
fi
rm -rf leveldb
cd leveldb-src/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="$OSX_FLAGS $OSX_ARCH" \
-DCMAKE_CXX_FLAGS="$OSX_FLAGS $OSX_ARCH" \
-DLEVELDB_BUILD_TESTS=FALSE \
-DLEVELDB_BUILD_BENCHMARKS=FALSE \
-DLEVELDB_INSTALL=FALSE
2022-11-13 17:35:33 +01:00
cmake --build . -j
mkdir -p ../../leveldb
2022-11-13 17:35:33 +01:00
cp -v libleveldb.a ../../leveldb
cp -rv ../include ../../leveldb/include
echo "LevelDB build successful"