meson.build 2.16 KB
Newer Older
1 2 3 4 5 6 7 8
if get_option('gtk_doc')

subdir('xml')

glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
if get_option('gtk_doc')
  # only build the shared library for gtk-doc
  calls_vala_doc_lib = library('calls-vala-doc',
                               calls_vala_sources,
                               dependencies: calls_vala_deps)
  calls_doc_lib = library('calls-doc',
                          [calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, gdbofono_src],
                          include_directories: calls_includes,
                          link_with: calls_vala_doc_lib,
                          dependencies: calls_deps)
  calls_doc_deps = declare_dependency(sources: [calls_sources, calls_enum_sources, wayland_sources, wl_proto_sources, calls_vala_sources],
                                      include_directories: calls_includes,
                                      link_with: [calls_doc_lib, calls_vala_doc_lib],
                                      dependencies: [calls_deps, calls_vala_deps])
endif

25 26 27 28 29
gnome.gtkdoc('calls',
           main_xml: 'calls-docs.xml',
            src_dir: [
                       join_paths(meson.source_root(), 'src'),
                       join_paths(meson.build_root(), 'src'),
30
                       join_paths(meson.build_root(), 'plugins/ofono/libgdbofono'),
31
                     ],
32
       dependencies: calls_doc_deps,
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
          scan_args: [
                       '--rebuild-types',
                     ],
       fixxref_args: [
                       '--html-dir=@0@'.format(docpath),
                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
                     ],
        install_dir: 'calls',
            install: true)

endif