| 1 |
project('gtkdoctest', 'c', version : '1.0.0') |
| 2 |
|
| 3 |
gtkdoc = find_program('gtkdoc-scan', required: false) |
| 4 |
if not gtkdoc.found() |
| 5 |
error('MESON_SKIP_TEST gtkdoc not found.') |
| 6 |
endif |
| 7 |
|
| 8 |
gnome = import('gnome') |
| 9 |
|
| 10 |
assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtk-doc/html/foobar', 'Gtkdoc install dir is incorrect.') |
| 11 |
|
| 12 |
inc = include_directories('include') |
| 13 |
|
| 14 |
subdir('include') |
| 15 |
|
| 16 |
# disable this test unless a bug fix for spaces in pathnames is present |
| 17 |
# https://bugzilla.gnome.org/show_bug.cgi?id=753145 |
| 18 |
result = run_command(gtkdoc, ['--version'], check: true) |
| 19 |
gtkdoc_ver = result.stdout().strip() |
| 20 |
if gtkdoc_ver == '' |
| 21 |
gtkdoc_ver = result.stderr().strip() |
| 22 |
endif |
| 23 |
if gtkdoc_ver.version_compare('<1.26') |
| 24 |
error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.') |
| 25 |
endif |
| 26 |
|
| 27 |
gobject = dependency('gobject-2.0') |
| 28 |
|
| 29 |
libfoo = shared_library('foo', 'foo.c', |
| 30 |
include_directories: inc, |
| 31 |
dependencies: gobject, |
| 32 |
) |
| 33 |
|
| 34 |
deps = [] |
| 35 |
if host_machine.system() == 'darwin' |
| 36 |
deps += dependency('appleframeworks', modules : ['Foundation', 'CoreFoundation']) |
| 37 |
endif |
| 38 |
|
| 39 |
foo_dep = declare_dependency( |
| 40 |
link_with: libfoo, |
| 41 |
include_directories: inc, |
| 42 |
dependencies: deps, |
| 43 |
) |
| 44 |
|
| 45 |
subdir('doc') |