https://github.com/awesome-doge/ton-compile/blob/main/ninja-Apple%20M1.md
# Install dependent packages
brew update
brew install openssl cmake llvm
brew link openssl --force
# Install ninja
brew install ninja
# generate env folder / clone ton source code
mkdir ~/ton-env
cd ~/ton-env
git clone --recursive https://github.com/ton-blockchain/ton.git
# compile
cd ~/ton-env/
mkdir ton-bin
cd ~/ton-env/ton-bin
cmake ~/ton-env/ton \
-DCMAKE_BUILD_TYPE=Release \
-GNinja
cpunumber=$(sysctl -n hw.logicalcpu)
ninja -j $cpunumber