Yes, in your root project folder’s CMakeLists.txt. Don’t make any changes to TorchConfig.cmake
but, if you are encountering an error missing dll(s) on windows, here is an workaround.
file(GLOB TORCH_DLLS ${TORCH_INSTALL_PREFIX}/lib/*.dll)
 add_custom_command(TARGET <exe-name> POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E copy
   ${TORCH_DLLS}
   ${CMAKE_CURRENT_BINARY_DIR}
   DEPENDS <exe-name>
 )

this copies dlls into path of your executable.