summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/10 gtk-doc/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/frameworks/10 gtk-doc/meson.build
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/frameworks/10 gtk-doc/meson.build')
-rw-r--r--test cases/frameworks/10 gtk-doc/meson.build45
1 files changed, 45 insertions, 0 deletions
diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
new file mode 100644
index 0000000..b49efc0
--- /dev/null
+++ b/test cases/frameworks/10 gtk-doc/meson.build
@@ -0,0 +1,45 @@
+project('gtkdoctest', 'c', version : '1.0.0')
+
+gtkdoc = find_program('gtkdoc-scan', required: false)
+if not gtkdoc.found()
+ error('MESON_SKIP_TEST gtkdoc not found.')
+endif
+
+gnome = import('gnome')
+
+assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtk-doc/html/foobar', 'Gtkdoc install dir is incorrect.')
+
+inc = include_directories('include')
+
+subdir('include')
+
+# disable this test unless a bug fix for spaces in pathnames is present
+# https://bugzilla.gnome.org/show_bug.cgi?id=753145
+result = run_command(gtkdoc, ['--version'], check: true)
+gtkdoc_ver = result.stdout().strip()
+if gtkdoc_ver == ''
+ gtkdoc_ver = result.stderr().strip()
+endif
+if gtkdoc_ver.version_compare('<1.26')
+ error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.')
+endif
+
+gobject = dependency('gobject-2.0')
+
+libfoo = shared_library('foo', 'foo.c',
+ include_directories: inc,
+ dependencies: gobject,
+)
+
+deps = []
+if host_machine.system() == 'darwin'
+ deps += dependency('appleframeworks', modules : ['Foundation', 'CoreFoundation'])
+endif
+
+foo_dep = declare_dependency(
+ link_with: libfoo,
+ include_directories: inc,
+ dependencies: deps,
+)
+
+subdir('doc')