To expand on @Logaritm's answer, you can do this entirely in WiX 3.14 - it has to be 3.14 because the behaviour was specifically added at that version.
- Install WiX 3.14
- Open your WiX project in Visual Studio and add a Reference to WixUtilExtension, loading the dll from the C:\Program Files (x86)\WiX Toolset v3.14\bin folder
- Add this exact element <PropertyRef Id="WIX_NATIVE_MACHINE"/> as a child of the <Product> parent in the wxs file.
During installation, msiexec will run a custom action that assigns a value to WIX_NATIVE_MACHINE.
- Add <Condition> items to your wxs files, e.g.
<Condition>WIX_NATIVE_MACHINE = "43620"</Condition>
The following link lists the possible values of WIX_NATIVE_MACHINE in hex - image-file-machine-constants - WiX understands decimal so you'll have to do the conversion.