Headers handling is weak
I may be missing something, but it doesn't look like cmake handles headers too well.
- Half the Internet seems to think they should be put into target_sources, the other half thinks they shouldn't. And the docs are not explicit about this.
- Modern cmake target-based approach is very nice. But headers seem to be the last thing that is still treated in an "old cmake" style. People use "install(DIRECTORY)" to install headers, but these should be handled with install(TARGETS) as everything else.
- CMake/CPack support for "make dist"/"make distcheck" seems to be limited by not knowing about the headers (I'm supposing here they should not be included in target_sources).
- People may want to add a label to all the headers related to a target, maybe for coverage filtering in CTest. But since they are installed with "install(DIRECTORY)" and there is no "make distcheck" they may forget to label some headers, affecting their coverage reports.
automake seems to handle them just fine (https://www.gnu.org/software/automake/manual/html_node/Headers.html). There are details like the "nobase_" thing to keep in mind, but I can't see any big specific problem explaining why there isn't a "target_headers()" command and "install(TARGETS targets HEADERS ...)" in CMake.