Gratzer's book (2011 edition) about lattice has details about the existence of the (semi)lattice freely generated by a poset $P$ in a  given (quasi)variety of (semi)lattices (possibly with suitable additional oparations, for example boolean algebras).


One takes the elements of $P$ as generators, and the relations are the $x\leq y$ valid in $P$ (they are equivalent to [semi]lattice equations). 


The universal property is easily obtained: each isotone map of $P$ towards a object $L$ in the quasivariety uniquely factorizes: first the natural isotone map from $P$ to the free object $L(P)$, then a (unique) homomorphism from $L(P)$ to $L$.


To see that the natural isotone map from $P$ to $L(P)$ is injective, it sufficies to see that one isotone map from $P$ to a $L$ is injective, and this follows from Birkhoff transform (embedding of $P$ in its lattice of order ideals, i.e. categorical equivalence between posets, Alexandroff discrete T$_0$ topological spaces, algebraic and dually algebraic distributive lattices). Provided that the given quasivariety contains all distributive lattices (or complete atomic boolean algebras, since Birkhoff transform naturally embeds also in them), but this is usually obvious (the only variety of lattices that does not include all distributive lattices is the trivial variety of one-element lattices).

Taking as $P$ the anti-chain with $n>2$ elements one sees that $L(P)$ is the free object (in the quasivariety) on $n$-generators; in particoular it is generally not the Dedekind-McNeill completion of $P$  (which is the projective line with $n$ points, hence $2$-distributive, a quite strong lattice identity). If you look at the directions of the arrows for the universal property of the Dedekind-McNeille completion (among all completions) and for the above $L(P)$ you will find this non-coincidence unsurprising (and you will find another example where lattices have too many kinds of useful morphisms to look at them with only one category).