summaryrefslogtreecommitdiff
path: root/Documentation/meson.build
blob: 57c3fdcf7cc75b2b5825515b8d683a34f6e7ce68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
doc_install_dir = join_paths(get_option('datadir'), 'doc', 'libcamera-@0@'.format(api_version))

sphinx = find_program('sphinx-build-3', required: false)
if not sphinx.found()
    sphinx = find_program('sphinx-build', required: false)
endif

if sphinx.found()
    docs_sources = [
        'conf.py',
        'contributing.rst',
        'index.rst',
    ]

    custom_target('documentation',
                  command: [sphinx, '-W', '-b', 'html', meson.current_source_dir(), '@OUTPUT@'],
                  input: docs_sources,
                  output: 'html',
                  build_by_default: true,
                  install: true,
                  install_dir: doc_install_dir)
endif