  Let $\Gamma$ be a graph product of finite groups, with finite underlying
graph, and let $\Delta$ be the associated right-angled building. We prove that
a uniform lattice $\Lambda$ in the cubical automorphism group Aut$(\Delta)$ is
weakly commensurable to $\Gamma$ if and only if all convex subgroups of
$\Lambda$ are separable. As a corollary, any two finite special cube complexes
with universal cover $\Delta$ have a common finite cover. An important special
case of our theorem is where $\Gamma$ is a right-angled Coxeter group and
$\Delta$ is the associated Davis complex. We also obtain an analogous result
for right-angled Artin groups. In addition, we deduce quasi-isometric rigidity
for the group $\Gamma$ when $\Delta$ has the structure of a Fuchsian building.
