File: meson.build

package info (click to toggle)
blueprint-compiler 0.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,140 kB
  • sloc: python: 8,504; sh: 31; makefile: 6
file content (45 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
project('blueprint-compiler',
  version: '0.18.0',
)

prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))

py = import('python').find_installation('python3')

subdir('docs')

configure_file(
  input: 'blueprint-compiler.pc.in',
  output: 'blueprint-compiler.pc',
  configuration: { 'VERSION': meson.project_version() },
  install: not meson.is_subproject(),
  install_dir: join_paths(datadir, 'pkgconfig'),
)

config = configuration_data({
  'VERSION': meson.project_version(),
  'LIBDIR': get_option('prefix') / get_option('libdir'),
})

if meson.is_subproject()
  config.set('MODULE_PATH', meson.current_source_dir())
else
  config.set('MODULE_PATH', py.get_install_dir())
endif

blueprint_compiler = configure_file(
  input: 'blueprint-compiler.py',
  output: 'blueprint-compiler',
  configuration: config,
  install: not meson.is_subproject(),
  install_dir: get_option('bindir'),
)

if meson.is_subproject()
  meson.override_find_program('blueprint-compiler', blueprint_compiler)
else
  install_subdir('blueprintcompiler', install_dir: py.get_install_dir())
endif

subdir('tests')