cmake: add transitive dependency on legacy-option-headers
the legacy-option-headers target is only marked as a dependency of the
common-objs and common-common-objs. because those targets are OBJECT
libraries, their dependencies aren't inherited by the targets that link
common-objs or common-common-objs
this adds the dependencies manually, so that changes to the config
yaml files will cause legacy-option-headers to regenerate the headers