#!/bin/bash
brew install gperf cmake openssl
git submodule update --init
cd td
#rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl/ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
cmake --build .
cd ../..
mkdir -p build/runtimes/osx-arm64/native
cp td/build/libtdjson.*.dylib build/runtimes/osx-arm64/native/libtdjson.dylib
ls -lah build/runtimes/osx-arm64/native
dotnet build
nuget pack
