diff options
author | Martin Blanchard <tchaik@gmx.com> | 2018-05-29 23:13:34 +0100 |
---|---|---|
committer | Martin Blanchard <tchaik@gmx.com> | 2019-02-04 15:52:49 +0000 |
commit | f5377d5fdcdb0a3bbc292335103a9fcd791e97ea (patch) | |
tree | 8a4b2a2c9eb183fa66d447da8e7cd066f88ce203 /docs | |
parent | fbae3ea18d3c7624c98d820e574c83fc2927dca7 (diff) | |
download | libchamplain-f5377d5fdcdb0a3bbc292335103a9fcd791e97ea.tar.gz |
Port to meson build system
The meson build system focuses on speed an ease of use,
which helps speeding up the software development.
https://bugzilla.gnome.org/show_bug.cgi?id=794324
https://gitlab.gnome.org/GNOME/libchamplain/issues/37
Closes #37
Diffstat (limited to 'docs')
-rw-r--r-- | docs/meson.build | 6 | ||||
-rw-r--r-- | docs/reference-gtk/meson.build | 51 | ||||
-rw-r--r-- | docs/reference/meson.build | 72 |
3 files changed, 129 insertions, 0 deletions
diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 0000000..d7ecf41 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1,6 @@ +if build_gtk_doc == true + subdir('reference') + if build_gtk_widgetry == true + subdir('reference-gtk') + endif +endif
\ No newline at end of file diff --git a/docs/reference-gtk/meson.build b/docs/reference-gtk/meson.build new file mode 100644 index 0000000..45dc105 --- /dev/null +++ b/docs/reference-gtk/meson.build @@ -0,0 +1,51 @@ +gtk_prefix = gtk_dep.get_pkgconfig_variable('prefix') +gtk_docpath = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html', 'gtk3') + +libchamplain_gtk_reference_ignored_h = [ + 'champlain-gtk-marshal.h', + 'champlain-gtk.h', +] + +version_xml = configuration_data() +version_xml.set('PACKAGE_VERSION', version) + +configure_file( + input: 'version.xml.in', + output: 'version.xml', + configuration: version_xml, + install: false, +) + +libchamplain_gtk_reference_scan_args = [ + '--rebuild-types', + '--deprecated-guards=GTK_DISABLE_DEPRECATED', + '--ignore-headers=' + ' '.join(libchamplain_gtk_reference_ignored_h), +] + +libchamplain_gtk_reference_mkdb_args = [ + '--output-format=xml', + '--name-space=gtk_champlain', +] + +libchamplain_gtk_reference_fixxref_args = [ + '--html-dir=@0@'.format(join_paths(gtkdocdir, 'html', package_gtk_string)), + '--extra-dir=@0@'.format(gtk_docpath), + '--extra-dir=@0@'.format(join_paths(gtkdocdir, 'html', package_string)), +] + +gnome.gtkdoc( + package_gtk_string, + main_sgml: 'libchamplain-gtk-docs.sgml', + gobject_typesfile: files('libchamplain-gtk.types'), + src_dir: libchamplain_gtk_srcdir, + dependencies: libchamplain_gtk_dep, + scan_args: libchamplain_gtk_reference_scan_args, + mkdb_args: libchamplain_gtk_reference_mkdb_args, + fixxref_args: libchamplain_gtk_reference_fixxref_args, + install: true, + install_dir: join_paths( + gtkdocdir, + 'html', + package_gtk_string, + ) +) diff --git a/docs/reference/meson.build b/docs/reference/meson.build new file mode 100644 index 0000000..f4c83d2 --- /dev/null +++ b/docs/reference/meson.build @@ -0,0 +1,72 @@ +glib_prefix = glib_dep.get_pkgconfig_variable('prefix') +glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html', 'glib') + +gobject_prefix = gobject_dep.get_pkgconfig_variable('prefix') +gobject_docpath = join_paths(gobject_prefix, 'share', 'gtk-doc', 'html', 'gobject') + +clutter_prefix = clutter_dep.get_pkgconfig_variable('prefix') +clutter_docpath = join_paths(clutter_prefix, 'share', 'gtk-doc', 'html', 'clutter') + +libchamplain_reference_ignored_h = [ + 'champlain-adjustment.h', + 'champlain-debug.h', + 'champlain-defines.h', + 'champlain-enum-types.h', + 'champlain-features.h', + 'champlain-kinetic-scroll-view.h', + 'champlain-marshal.h', + 'champlain-private.h', + 'champlain-viewport.h', + 'champlain.h', +] + +if build_with_memphis == false + libchamplain_reference_ignored_h += [ + 'champlain-memphis-renderer.h', + ] +endif + +version_xml = configuration_data() +version_xml.set('PACKAGE_VERSION', version) + +configure_file( + input: 'version.xml.in', + output: 'version.xml', + configuration: version_xml, + install: false, +) + +libchamplain_reference_scan_args = [ + '--rebuild-types', + '--deprecated-guards=GTK_DISABLE_DEPRECATED', + '--ignore-headers=' + ' '.join(libchamplain_reference_ignored_h), +] + +libchamplain_reference_mkdb_args = [ + '--output-format=xml', + '--name-space=champlain', +] + +libchamplain_reference_fixxref_args = [ + '--html-dir=@0@'.format(join_paths(gtkdocdir, 'html', package_string)), + '--extra-dir=@0@'.format(glib_docpath), + '--extra-dir=@0@'.format(gobject_docpath), + '--extra-dir=@0@'.format(clutter_docpath), +] + +gnome.gtkdoc( + package_string, + main_sgml: 'libchamplain-docs.sgml', + gobject_typesfile: files('libchamplain.types'), + src_dir: libchamplain_srcdir, + dependencies: libchamplain_dep, + scan_args: libchamplain_reference_scan_args, + mkdb_args: libchamplain_reference_mkdb_args, + fixxref_args: libchamplain_reference_fixxref_args, + install: true, + install_dir: join_paths( + gtkdocdir, + 'html', + package_string, + ) +) |