Transitive dependencies for include directories break

OK, that wasn’t clear. The thing is that b has a link dependency on a. When CMake generates the full tree for use in a compilation line, that is when the full dependency tree is traversed and expanded. CMake cannot, in general, compute this full tree on-demand because there are ways of constructing them that depend on the target being linked. For example, this will make the include directories depend on whether an executable or library is consuming it:

target_include_directories(foo
  INTERFACE
    "$<$<STREQUAL:$<TARGET_PROPERTY,TYPE>,EXECUTABLE>:executable/only/include>")

There’s an issue about getting the transitive dependency closure of a target, but I can’t find it right now.