[CMake] Automatically updating Doxygen documentation and making it readily available to users with CMake

Roger Leigh rleigh at codelibre.net
Thu Feb 21 15:51:23 EST 2019


On 21/02/2019 14:18, Timothy Wrona wrote:
> Perhaps there is a standard location to "install" the documentation when 
> running the install command for a project?

This collection builds and installs the documentation into a standard 
location, as well as reporting undocumented code.  Feel free to copy and 
adapt.  Could be turned into an official module if there was interest 
for a generic solution for doxygen docs building and installing.

 
https://gitlab.com/codelibre/ome-common-cpp/blob/master/docs/doxygen/CMakeLists.txt

 
https://gitlab.com/codelibre/ome-common-cpp/blob/master/docs/doxygen/api.dox.cmake

 
https://gitlab.com/codelibre/ome-common-cpp/blob/master/cmake/Doxygen.cmake

 
https://gitlab.com/codelibre/ome-common-cpp/blob/master/cmake/DoxygenCheck.cmake

Dependent modules can also cross-reference documentation for modules 
they depend upon.  See lines 44-56 for overriding the tagfiles, which 
are then substituted into the generated doxyfile configuration.  This 
could also be generalised to make into a reusable module.

 
https://gitlab.com/codelibre/ome-files-cpp/blob/master/docs/doxygen/CMakeLists.txt

You can see this on the GitLab documentation pages (linked from the 
README) for the project(s) in question.

Hope that's potentially of some use for anyone interested.


Roger


More information about the CMake mailing list