chapter10 - documents
Adding Doxygen to your project
安装必要软件包:
apt-get install doxygen graphviz
然后就能在 CMake 中引入 Doxygen 包并使用 doxygen_add_docs
。
Since CMake 3.9, we can use the
doxygen_add_docs()
function fromFindDoxygen
find-module, which sets the documentation target up.注意 FindDoxygen module 推荐使用方式是 find_package,虽然可以 include 但是不推荐。
doxygen 用的是 Javadoc 的格式。
通过设置 DOXYGEN_HTML_EXTRA_STYLESHEET
选项可以修改输出文档的样式。比如 https://github.com/jothepro/doxygen-awesome-css 就是一个比较现代化的样式。