Skip to content

Latest commit

 

History

History
 
 

doxygen_example2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Doxygen CMake Example2

说明

前一个例子 doxygen_cmake_example 只是勉强可用,这个例子则使用 configure_file 的技巧(如果不会,可以看 configure_file_example ),通过在 Doxyfile.in 模板文件中清晰的指定 Doxyfile 所需要的每个参数,包括使用 CMAKE_SOURCE_DIR 这样的 cmake 变量等。

此外还避免了手动执行 doxygen 的步骤,完全集成在 cmake 中。

步骤

mkdir build
cd build
cmake ..
cmake --build .
# 则得到 html 目录静态网站文件,可以直接打包上传发布(CI),或本地临时部署:
cd html
python -m http.server 7083  # 访问 localhost:7083 查看文档

References

https://vicrucann.github.io/tutorials/quick-cmake-doxygen/