  Let $G$ be a right-angled Artin group with $|\mathrm{Out}(G)|<+\infty$. We
prove that if a countable group $H$ with bounded torsion is measure equivalent
to $G$, with an $L^1$-integrable measure equivalence cocycle towards $G$, then
$H$ is finitely generated and quasi-isometric to $G$. In particular, through
work of Kleiner and the second-named author, $H$ acts properly and cocompactly
on a $\mathrm{CAT}(0)$ cube complex which is quasi-isometric to $G$ and
equivariantly projects to the right-angled building of $G$.
  As a consequence of work of the second-named author, we derive a
superrigidity theorem in integrable measure equivalence for an infinite class
of right-angled Artin groups, including those whose defining graph is an
$n$-gon with $n\ge 5$. In contrast, we also prove that if a right-angled Artin
group $G$ with $|\mathrm{Out}(G)|<+\infty$ splits non-trivially as a product,
then there does not exist any locally compact group which contains all groups
$H$ that are $L^1$-measure equivalent to $G$ as lattices, even up to replacing
$H$ by a finite-index subgroup and taking the quotient by a finite normal
subgroup.
