I had originally done this in #662, but never re-submitted it. 06aa271e5bca1a74692c8828ad8585dd9598e092 reminded me that I should also include Doxygen documentation in the Debian package, so I took a bit of time to re-prepare this patch.
Using CMake's doxygen_add_docs() isn't only more concise and idiomatic, it also solves actual issues of Doxygen-generated documentation. Without this patch, the generated docs include an absolute path of the build directory; apart from being ugly, it also creates issues with reproducibility, as it is required to rebuild the package in the same exact directory to get a bit-by-bit identical copy of the package.
CMake is able to work around this Doxygen quirk, and the generated HTML only includes relative paths.
The documentation gets now output to build/html/ instead of build/docs/html/.
As another minor change, I've also associated the installed docs to the Documentation component, so that users can choose to install only them with cmake --install builddir --component Documentation.
Here's a full diff of the generated output before and after applying this patch:
I had originally done this in #662, but never re-submitted it. 06aa271e5bca1a74692c8828ad8585dd9598e092 reminded me that I should also include Doxygen documentation in the Debian package, so I took a bit of time to re-prepare this patch.
Using CMake's
doxygen_add_docs()
isn't only more concise and idiomatic, it also solves actual issues of Doxygen-generated documentation. Without this patch, the generated docs include an absolute path of the build directory; apart from being ugly, it also creates issues with reproducibility, as it is required to rebuild the package in the same exact directory to get a bit-by-bit identical copy of the package.CMake is able to work around this Doxygen quirk, and the generated HTML only includes relative paths.
The documentation gets now output to
build/html/
instead ofbuild/docs/html/
.As another minor change, I've also associated the installed docs to the
Documentation
component, so that users can choose to install only them withcmake --install builddir --component Documentation
.Here's a full diff of the generated output before and after applying this patch: