I'm reading the cmakelist file of a big project, and confused about the usage of target_include_directories
and include_directories
.
The include_directories
should be able to add all header files to path where the compiler search for. But I still see some target_include_directories
in the cmakelist file of sub directories, that specify some include path for a specific target.
Can anybody explain the usage of these two? As far as I concerned, add all paths of header file to include_directories
should be enough.