GNOME Bugzilla – Bug 756297
Add CMake module
Last modified: 2015-11-19 07:07:47 UTC
There are a few open source projects using CMake and GTK-Doc, each with their own rules for running the various tools. It would be better to ship a CMake macro upstream with GTK-Doc that everyone using CMake could use.
Created attachment 312967 [details] [review] V1 Patch to add CMake modules to gtk-doc
Created attachment 312968 [details] [review] V2 Patch to add CMake modules to gtk-doc
I also did a branch of Midori that uses this macro instead of their custom build rules for GTK-Doc, as a test case: https://bazaar.launchpad.net/~sam.thursfield/midori/midori/changes/
Created attachment 314987 [details] [review] V3 Patch to add CMake modules to gtk-doc I made a pretty ridiculous mistake in the previous patch... committing the generated files to Git rather than the input files! This is fixed in V3, and the new version also fixes problems with dependencies between the custom commands, putting generated files in the wrong place, and setting LDPATH wrong when scanning with g-ir-scanner.
Created attachment 314988 [details] [review] V4 Patch to add CMake modules to gtk-doc Sorry for the noise... the documentation of gtk_doc_add_module() now mentions the SOURCE keyword properly. The branch of Midori I made that uses this module is also updated to work with the SOURCE keyword that I added (previously it wasn't a keyword, only one source directory could be passed, but that is broken if you have generated code in builddir that you want to document, and probably in other cases too)
Review of attachment 314988 [details] [review]: Awesome, will merge this now.
Review of attachment 314988 [details] [review]: ::: cmake/Makefile.am @@ +1,3 @@ +EXTRA_DIST = \ + GtkDocConfig.cmake.in + GtkDocConfigVersion.cmake.in this is missing the \ and I think also 'GtkDocScanGObjWrapper.cmake' as otherwise make distcheck fails. I'll fix that with the push.
The following fix has been pushed: 431a3de build: add CMake modules to gtk-doc
Created attachment 315865 [details] [review] build: add CMake modules to gtk-doc Add cmake support files.