Where does the Component parts of CPack + Wix go

I need to generate a Wix Package for a windows service which seems to require me to create custom wix template.

I tried the same with NSIS and was successfull unitl they asked for some Wix specific stuff.

So I copied the Wix template into my modules dir and was surprised to see how thin it is.
I need to edit the part of the Wix that is associated with the component that is the service. (there is a lib, test executable and unit tests)

Am I suppose to set CPACK and WIX variables in each component along side the install, is that how the “<Component” part of the wxs xml should be created?