6a20000ae195a929d1248720cc121191e0e5c8ad
[platform/upstream/libnice.git] / docs / reference / libnice / meson.build
1 docpath = join_paths(nice_datadir, 'gtk-doc', 'html')
2
3 ignore_headers = [
4   'conncheck.h',
5   'discovery.h',
6   'stream.h',
7   'component.h',
8   'agent-priv.h',
9   'iostream.h',
10   'inputstream.h',
11   'outputstream.h',
12   'gstnice.h',
13   'gstnicesrc.h',
14   'gstnicesink.h',
15   'md5.h',
16   'sha1.h',
17   'stunhmac.h',
18   'utils.h',
19   'rand.h',
20   'stun5389.h',
21   'stuncrc32.h',
22   'stund.h',
23   'agent-signals-marshal.h',
24   'win32_common.h',
25 ]
26
27 if dependency('gtk-doc', version: '<1.30', required: false).found()
28   prog_python = import('python').find_installation('python3')
29   fake_makefile = custom_target ('libnice-docs-test-Makefile',
30                                  output: 'Makefile',
31                                  command: [
32                                    prog_python, '-c',
33                                    'with open("@OUTPUT@","w") as f: f.writelines(["""DOC_MODULE=libnice\nDOC_MAIN_SGML_FILE=libnice-docs.sgml\n"""])'
34                                    ])
35 else
36   fake_makefile = []
37 endif
38
39 gnome.gtkdoc('libnice',
40              content_files: [fake_makefile],
41              main_xml: 'libnice-docs.xml',
42              namespace: 'nice',
43              mode: 'none',
44              src_dir: [agent_include, stun_include],
45              content_files: fake_makefile,
46              dependencies: libnice_dep,
47              scan_args: [
48                '--rebuild-types',
49                #'--deprecated-guards=G_DISABLE_DEPRECATED',
50                #'--ignore-decorators=' + '|'.join(ignore_decorators),
51                '--ignore-headers=' + ' '.join(ignore_headers),
52              ],
53              html_assets: [
54                'states.png',
55              ],
56              fixxref_args:[
57                '--html-dir=' + docpath,
58              ],
59              mkdb_args: [ # not sure if these need to be specified explicitly here
60                '--xml-mode',
61                '--output-format=xml',
62                '--name-space=Nice',
63              ],
64              install: true,
65              check: true)
66
67 # If we ever need to regenerate this diagram.
68 # Since it’s not expected to change much, let’s not depend on GraphViz to
69 # build the docs (that's also why we don't use find_program('dot') here)
70 run_target('update-states.png',
71   command: ['dot',
72             '-Tpng',
73             '-o', join_paths(meson.current_source_dir(), 'states.png'),
74             '-Gsize=9.6,2.9!',
75             '-Gdpi=200',
76             files('states.gv')])