  We derive necessary and sufficient conditions for order-2 $CP$ ($CP2$)
symmetry in $N$-Higgs-doublet potentials for $N>2$. The conditions, which are
formulated as relations between vectors that transform under the adjoint
representation of $\mathsf{SU}(N)$ under a change of doublet basis, are
representation theoretical in nature. Making use of Lie algebra and
representation theory we devise an efficient, computable algorithm which may be
applied to decide whether or not a given numerical potential is $CP2$
invariant.
