Clean up libtorchaudio customization logic (#2039)
Summary: (See https://github.com/pytorch/audio/issues/2038 description for the overall goal.) This PR cleans up CMake customization logic for `libtorchaudio`. It introduces base variables LIBTORCHAUDIO_INCLUDE_DIRS, LIBTORCHAUDIO_LINK_LIBRARIES and LIBTORCHAUDIO_COMPILE_DEFINITIONS, which are respectively used when calling `target_include_directories`, `target_link_libraries` and `target_compile_definitions`. The customization logic only modifies these variables. The original implementation called these functions multiple times (once par customization logic) and it is getting difficult to understand the customization logic. Pull Request resolved: https://github.com/pytorch/audio/pull/2039 Reviewed By: carolineechen, nateanl Differential Revision: D32683004 Pulled By: mthrok fbshipit-source-id: 4d41f21692ac139b1185a6ab69eb45d881ee7e73
Showing
Please register or sign in to comment