In the doc/CMkeLists.txt there are specified mutiple build target aka "make doc-man" builds the manpages, "make doc-html" created the html doc, "make doc" creates the documentation, ...
What is needed, is that these different built target are available also if WITH_DOC is FALSE.
WITH_DOC should only switch, if the doc is build with the normal build target. So "make" creates the documentation.