breathe-doc / breathe

ReStructuredText and Sphinx bridge to Doxygen
https://breathe-doc.org
Other
743 stars 198 forks source link

Automatically use Doxygen project name and project version for Sphinx config #468

Open h1nk opened 4 years ago

h1nk commented 4 years ago

I'm currently using a CMake workflow I created to invoke my documentation generation tools (Doxygen & Sphinx). The Doxygen CMake module automatically uses the CMake project name to populate the Doxygen project name configuration value. It would be nice if breathe could additionally take the project name and version from the Doyxgen configuration and pass it all the way through to Sphinx and allow me to omit both the project name and version from the Sphinx project information configuration values.

jakobandersen commented 4 years ago

This may be difficult for Breathe to do as the Sphinx project information is set in config variables in conf.py. Though, as you can write arbitrary Python code in conf.py you can initialize the information from wherever (e.g., reading it from a file generated by CMake).

vermeeren commented 4 years ago

@h1nk I recommend you instead simply template the conf.py and use something like https://cmake.org/cmake/help/latest/command/configure_file.html, this doesn't need special integration and works for practically anything.