add snappy and leveldb to LD_LIBRARY_PATH
This commit is contained in:
parent
b9100d77aa
commit
0c336c59bf
|
@ -35,7 +35,21 @@ else
|
||||||
echo "skip install leveldb"
|
echo "skip install leveldb"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function add_path()
|
||||||
|
{
|
||||||
|
# $1 path variable
|
||||||
|
# $2 path to add
|
||||||
|
if [ -d "$2" ] && [[ ":$1:" != *":$2:"* ]]; then
|
||||||
|
echo "$1:$2"
|
||||||
|
else
|
||||||
|
echo "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
export CGO_CFLAGS="-I$LEVELDB_DIR/include -I$SNAPPY_DIR/include"
|
export CGO_CFLAGS="-I$LEVELDB_DIR/include -I$SNAPPY_DIR/include"
|
||||||
export CGO_LDFLAGS="-L$LEVELDB_DIR/lib -L$SNAPPY_DIR/lib -lsnappy"
|
export CGO_LDFLAGS="-L$LEVELDB_DIR/lib -L$SNAPPY_DIR/lib -lsnappy"
|
||||||
|
export LD_LIBRARY_PATH=$(add_path $LD_LIBRARY_PATH $SNAPPY_DIR/lib)
|
||||||
|
export LD_LIBRARY_PATH=$(add_path $LD_LIBRARY_PATH $LEVELDB_DIR/lib)
|
||||||
|
|
||||||
go get github.com/jmhodges/levigo
|
|
||||||
|
go get github.com/jmhodges/levigo
|
||||||
|
|
Loading…
Reference in New Issue