Fix TORCH_LIBRARIES variables when do static build (#49458)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/21737
With this fix, TORCH_LIBRARIES variable can provide all nessesary static libraries build from pytorch repo.
User program (if do static build) now can just link with ${TORCH_LIBRARIES} + MKL + cuda runtime.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49458
Reviewed By: mrshenli
Differential Revision: D25895354
Pulled By: malfet
fbshipit-source-id: 8ff47d14ae1f90036522654d4354256ed5151e5c