aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2017-06-19 19:53:58 -0400
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2017-06-19 20:03:09 -0400
commit12c997b804301570939c728aabd063f19ce456be (patch)
tree9d03179213f31f407c2277c6e48ae0fbb0934d64
parentca798e1538e18d12cef5ba44a587737a7f137a01 (diff)
downloadmeson-12c997b804301570939c728aabd063f19ce456be.zip
meson-12c997b804301570939c728aabd063f19ce456be.tar.gz
meson-12c997b804301570939c728aabd063f19ce456be.tar.bz2
Add example of generated header in docs.
-rw-r--r--test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml1
-rw-r--r--test cases/frameworks/10 gtk-doc/include/foo-version.h.in29
-rw-r--r--test cases/frameworks/10 gtk-doc/include/meson.build10
-rw-r--r--test cases/frameworks/10 gtk-doc/meson.build4
4 files changed, 43 insertions, 1 deletions
diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml
index d23b22f..028b808 100644
--- a/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml
+++ b/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml
@@ -34,6 +34,7 @@
</para>
</partintro>
<xi:include href="xml/foo.xml"/>
+ <xi:include href="xml/foo-version.xml"/>
</reference>
</book>
diff --git a/test cases/frameworks/10 gtk-doc/include/foo-version.h.in b/test cases/frameworks/10 gtk-doc/include/foo-version.h.in
new file mode 100644
index 0000000..30751cd
--- /dev/null
+++ b/test cases/frameworks/10 gtk-doc/include/foo-version.h.in
@@ -0,0 +1,29 @@
+#pragma once
+
+/**
+ * SECTION:version
+ * @section_id: foo-version
+ * @short_description: <filename>foo-version.h</filename>
+ * @title: Foo Versioning
+ */
+
+/**
+ * FOO_MAJOR_VERSION:
+ *
+ * The major version of foo.
+ */
+#define FOO_MAJOR_VERSION (@FOO_MAJOR_VERSION@)
+
+/**
+ * FOO_MINOR_VERSION:
+ *
+ * The minor version of foo.
+ */
+#define FOO_MINOR_VERSION (@FOO_MINOR_VERSION@)
+
+/**
+ * FOO_MICRO_VERSION:
+ *
+ * The micro version of foo.
+ */
+#define FOO_MICRO_VERSION (@FOO_MICRO_VERSION@)
diff --git a/test cases/frameworks/10 gtk-doc/include/meson.build b/test cases/frameworks/10 gtk-doc/include/meson.build
new file mode 100644
index 0000000..4c85b80
--- /dev/null
+++ b/test cases/frameworks/10 gtk-doc/include/meson.build
@@ -0,0 +1,10 @@
+cdata = configuration_data()
+parts = meson.project_version().split('.')
+cdata.set('FOO_MAJOR_VERSION', parts[0])
+cdata.set('FOO_MINOR_VERSION', parts[1])
+cdata.set('FOO_MICRO_VERSION', parts[2])
+configure_file(input : 'foo-version.h.in',
+ output : 'foo-version.h',
+ configuration : cdata,
+ install : true,
+ install_dir : get_option('includedir'))
diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
index 95eeefa..4cfcca1 100644
--- a/test cases/frameworks/10 gtk-doc/meson.build
+++ b/test cases/frameworks/10 gtk-doc/meson.build
@@ -1,4 +1,4 @@
-project('gtkdoctest', 'c')
+project('gtkdoctest', 'c', version : '1.0.0')
gnome = import('gnome')
@@ -6,6 +6,8 @@ assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtkdoc/html/foobar', 'Gtkdoc in
inc = include_directories('include')
+subdir('include')
+
# We have to disable this test until this bug fix has landed to
# distros https://bugzilla.gnome.org/show_bug.cgi?id=753145
error('MESON_SKIP_TEST can not enable gtk-doc test until upstream fixes have landed.')