After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756297 - Add CMake module
Add CMake module
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: 1.25
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-09 15:32 UTC by Sam Thursfield
Modified: 2015-11-19 07:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
V1 Patch to add CMake modules to gtk-doc (18.91 KB, patch)
2015-10-09 15:37 UTC, Sam Thursfield
none Details | Review
V2 Patch to add CMake modules to gtk-doc (18.91 KB, patch)
2015-10-09 15:42 UTC, Sam Thursfield
none Details | Review
V3 Patch to add CMake modules to gtk-doc (20.46 KB, patch)
2015-11-06 13:17 UTC, Sam Thursfield
none Details | Review
V4 Patch to add CMake modules to gtk-doc (20.49 KB, patch)
2015-11-06 13:23 UTC, Sam Thursfield
committed Details | Review
build: add CMake modules to gtk-doc (20.95 KB, patch)
2015-11-19 07:07 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Sam Thursfield 2015-10-09 15:32:53 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.
Comment 1 Sam Thursfield 2015-10-09 15:37:49 UTC
Created attachment 312967 [details] [review]
V1 Patch to add CMake modules to gtk-doc
Comment 2 Sam Thursfield 2015-10-09 15:42:31 UTC
Created attachment 312968 [details] [review]
V2 Patch to add CMake modules to gtk-doc
Comment 3 Sam Thursfield 2015-10-09 15:45:13 UTC
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/
Comment 4 Sam Thursfield 2015-11-06 13:17:33 UTC
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.
Comment 5 Sam Thursfield 2015-11-06 13:23:58 UTC
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)
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2015-11-19 07:00:26 UTC
Review of attachment 314988 [details] [review]:

Awesome, will merge this now.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2015-11-19 07:05:02 UTC
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.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2015-11-19 07:07:39 UTC
The following fix has been pushed:
431a3de build: add CMake modules to gtk-doc
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2015-11-19 07:07:47 UTC
Created attachment 315865 [details] [review]
build: add CMake modules to gtk-doc

Add cmake support files.