TCM 1.1.0
A CMake module to reduce boilerplate
Loading...
Searching...
No Matches
Documentation

TCM provides a single function to generate a documentation using Doxygen (if installed) and Doxygen Awesome.

tcm_documentation (
[FILES <file_or_dir> ...]
[ASSETS <file_or_dir> ...]
[DOXYGEN_AWESOME_VERSION "vX.X.X"]
)

Parameter FILES specify input files and directories. ${PROJECT_SOURCE_DIR}/README.md is always added to the input.

Parameter ASSETS specify input files and directories that will be added to DOXYGEN_IMAGE_PATH. Referenced assets will be copied to the output folders by doxygen.

It uses doxygen_add_docs() under the hood. So, any Doxygen config option can be overridden by setting relevant variables before calling tcm_documentation(). For more information : https://cmake.org/cmake/help/latest/module/FindDoxygen.html

However, following parameters cannot not be overridden, since tcm_documentation() is setting them:

  • DOXYGEN_GENERATE_TREEVIEW to YES
  • DOXYGEN_DISABLE_INDEX to NO
  • DOXYGEN_FULL_SIDEBAR to NO
  • DOXYGEN_HTML_COLORSTYLE to LIGHT
  • DOXYGEN_DOT_IMAGE_FORMAT to svg

By default, DOXYGEN_USE_MDFILE_AS_MAINPAGE is set to "${PROJECT_SOURCE_DIR}/README.md".

Also, TCM provides a default header, footer, stylesheet, extra files (js script). You can override them, but since they are tightly linked together, you are better off not calling tcm_documentation().