Just for the completeness of this thread …
For (almost) all ROOT classes, somewhere in the middle of the ROOT “Class Reference” web pages, right before the “Inheritance diagram for ...:
” graph (right before the “Member, Constructor, ..., Documentation
” sections), one can find the information which “#include
” files are needed.
Starting with ROOT 6.12, at the bottom of these web pages, one can find the “Libraries for ...:
” graph, which shows the library to link and its dependencies.
For an example, see: “TFile
” Class Reference (needs “#include <TFile.h>
”, link against “libRIO
”)
BTW. For the available “CMake” targets, see: ls -al ${ROOTSYS}/cmake/ROOTConfig-targets*.cmake