Have you tried using different Configurations to pair with your targets and omit the configurations from the specific projects? Example:
Solution configurations :
LinuxDebug
LinuxRelease
WindowsDebug
WindowsRelease
And then you tell the solution to omit the linux projects from the Windows* configurations and vice versa?
I'll admit, I haven't leveraged xbuild but this approach works in MSBuild if you are using solutions and not traversal proj files. In the case of Traversal proj files you can just add conditionals to the ItemGroup inclusions to omit projects based on a $() property.