  The existence of a spin-liquid ground state of the $s=1/2$ Heisenberg kagome
antiferromagnet (KAFM) is well established. Meanwhile, also for the $s=1$
Heisenberg KAFM evidence for the absence of magnetic long-range order (LRO) was
found. Magnetic LRO in Heisenberg KAFMs can emerge by increasing the spin
quantum number $s$ to $s>1$ and for $s=1$ by an easy-plane anisotropy. In the
present paper we discuss the route to magnetic order in $s=1/2$ KAFMs by
including an isotropic interlayer coupling (ILC) $J_\perp$ as well as an
easy-plane anisotropy in the kagome layers by using the coupled-cluster method
to high orders of approximation. We consider ferro- as well as
antiferromagnetic $J_\perp$. To discuss the general question for the crossover
from a purely two-dimensional (2D) to a quasi-2D and finally to a
three-dimensional system we consider the simplest model of stacked (unshifted)
kagome layers. Although the ILC of real kagome compounds is often more
sophisticated, such a geometry of the ILC can be relevant for barlowite. We
find that the spin-liquid ground state present for the strictly 2D $s=1/2$
$XXZ$ KAFM survives a finite ILC, where the spin-liquid region shrinks
monotonously with increasing anisotropy. If the ILC becomes large enough (about
15\% of intralayer coupling for the isotropic Heisenberg case and about 4\% for
the $XY$ limit) magnetic LRO can be established, where the $q=0$ symmetry is
favorable if $J_\perp$ is of moderate strength. If the strength of the ILC
further increases, $\sqrt{3}\times \sqrt{3}$ LRO can become favorable against
$q=0$ LRO.
