By using private_dir_include() instead of enumerating headers in sources
of declare_dependency. Much more convenient, especially when there are
many headers.
Found out about this by reading #4638. It is not documented anywhere as
far as I can tell.
Including the following that has come up several times recent:
- How to use codegen for headers (that each target that uses the header
needs the object in it's sources)
- Using custom_targets with multiple outputs
This allows us to more easily have the documentation in sync with
the source code as people will have to document new features etc
right at the time where they implement it.