Sorry for asking stupid questions, but I don't understand your problem.
Are you trying to build separate targets? Why do you want to copy headers?

Edit: well, I do understand what your problem is, but not why.