File: meson.build

package info (click to toggle)
keyman 18.0.246-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,289; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (33 lines) | stat: -rw-r--r-- 1,155 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright:    © 2018 SIL International.
# Description:  Cross platform build script to extract and generate
#               documentation for the API. This is speculative ATM.
# Create Date:  5 Oct 2018
# Authors:      Tim Eves (TSE)
#

hotdoc = find_program('hotdoc', required: false)
installdir = join_paths(get_option('datadir'), 'doc', meson.project_name())

if hotdoc.found()
  cfg = configuration_data()
  cfg.set('project_name', meson.project_name())
  cfg.set('project_version', meson.project_version())
  cfg.set('doc_dir', meson.current_source_dir())
  cfg.set('include_dir', meson.current_source_dir() / '../include')
  configure_file(input: 'hotdoc.json',
                 output: 'hotdoc.json',
                 configuration: cfg)
  deps = files(
    '../include/keyman/keyman_core_api.h',
    '../src/jsonpp.hpp',
    '../../common/cpp/utfcodec.hpp'
  )

  docs = custom_target('docs',
    output: ['html'],
    input: ['sitemap.txt', 'markdown_files/index.md', deps],
    command: [hotdoc, '--verbose', '--conf-file=doc/hotdoc.json', '--output=doc', 'run'],
    depend_files: deps,
    install: true,
    install_dir: installdir)
endif