declare_dependency()'s sources field lists "sources to add to targets (or generated header files that should be built before sources including them are built)".
We don't want to add source files, as they'll fail to link in other compilation units, so we need to just extract the headers and give that list to the dep's sources.
declare_dependency()
'ssources
field lists "sources to add to targets (or generated header files that should be built before sources including them are built)".We don't want to add source files, as they'll fail to link in other compilation units, so we need to just extract the headers and give that list to the dep's
sources
.