Cross compiling Pytorch C++ extension

I am using Pytorch C++ extension, and I want to cross-compile (target is arm64) the C++ file instead of python setup.py install in the tutorial. Is there any way to do this?