Ask Your Question

Howto generate documentation when building with Visual Studio

asked 2016-10-13 07:35:38 -0500

MatsW gravatar image

What is the procedure to generate documentation when CMake has been configured to generate build files for Visual Studio? It said that one should run make html_docs to build HTML-documentation. But there is not even a makefile. Also, is it a requirement to have doxygen installed to generate documentation? Or is Sphinx sufficient?

edit retag flag offensive close merge delete


which opencv version is it ?

berak gravatar imageberak ( 2016-10-13 07:42:34 -0500 )edit

It's version 3.1.0

MatsW gravatar imageMatsW ( 2016-10-13 10:02:30 -0500 )edit

sphinx is only needed for opencv 2.4, you do not need it anymore for opencv 3

berak gravatar imageberak ( 2016-10-13 10:25:46 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-10-13 10:20:27 -0500

berak gravatar image

opencv moved to doxygen with opencv3, so you'll need that.

then it's quite easy:

  • in cmake / cmake-gui, make sure that
    1. BUILD_DOCS is set (-DBUILD_DOCS=ON on cmdline)
    2. DOXYGEN_EXECUTABLE points to your installed doxygen.exe
  • then, configure/generate as usual.
  • running make install (or build the INSTALL project in VS) will build the html docs in your install folder, you'll get exactly the same as here , the search feature works nicely, all you need then is a bookmark to /your/install/folder/docs/index.html in your browser.
edit flag offensive delete link more


BUILD_DOCS is set, and output from CMake says Documentation: Doxygen: C:/Program Files/Doxygen/bin/doxygen.exe (ver 1.8.12) PlantUML: NO

But not 'docs' catalog is created in my_build/install folder when i run 'Build' on INSTALL in VS 2015. And when I open my_build/cmake_install.cmake then I see no trace of instructions to create any documentation. Is PlantUML required as well?

MatsW gravatar imageMatsW ( 2016-10-14 04:26:44 -0500 )edit

no, PlantUML is not required (it would just make nicer class hierarchy diagrams)

and sorry for typo, it's install/doc/html here (not docs)

but again, you have to explicitly build the INSTALL project on VS (right click, -> build) to make it happen, it's not part of the regular build-all routine.

berak gravatar imageberak ( 2016-10-14 04:36:38 -0500 )edit

btw, i do not see any PlantUML option here.

berak gravatar imageberak ( 2016-10-14 04:45:50 -0500 )edit

Wow!! Now it works. Thanks a lot

MatsW gravatar imageMatsW ( 2016-10-14 14:30:09 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-10-13 07:35:38 -0500

Seen: 307 times

Last updated: Oct 13 '16