target_include_directories() vs headers in target_sources()

The situation has changed with the advent of file sets. Now you can define a HEADERS file set with target_sources(), and it does affect the header search path in a way that you probably don’t need target_include_directories() any more. See the target_sources documentation for details.

3 Likes