Documentation - Building from source

Have you clone opencv?
Yes, and opencv_contrib also.

I did as stated in https://docs.opencv.org/master/d4/db1/tutorial_documentation.html, :

Generate documentation

Get the OpenCV sources
Get the OpenCV_contrib sources
Create build directory near the sources folder(s) and go into it
Run cmake:

cmake -DBUILD_DOCS=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv

delete cmakecache.txt start cmakegui

And do what with it?, (I never used it before)