How to collect libtorch package like the official release when building from source?

I am trying to bulid libtorch from source by this.
I found that build/include directory only contain c10d(dir) and sleef.h(file), but official pre-build release contain (ATen c10 caffe2 pybind11 TH THC THCUNN THNN torch) dirs.

so, how can we get libtorch package just like official pre-build release(libtorch-win-shared-with-deps-debug-latest), particually windows platform.

I think using an appropriate CMake + make install should work, e.g. the Android build does this. You want to disable the Python bit for this.
The suggested alternative there works well, too - building Python and picking the lib and include. Libtorch 1.0 used to be built that way (actually extracting from the whl…).

Best regards


I found this script, is there any other way to create the LibTorch package the same as release?