Including sources in targets makes that file being compiled multiple times. Instead, define an OBJECT library (i.e., it is only compiled, but not linked), and link it into each target that uses it.
Including sources in targets makes that file being compiled multiple times. Instead, define an OBJECT library (i.e., it is only compiled, but not linked), and link it into each target that uses it.