summaryrefslogtreecommitdiff
path: root/gio/gdbus-2.0/codegen/meson.build
blob: 3ac6ea50848bf81af051fa17e33dd0b8a855134b (plain)
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
gdbus_codegen_files = [
  '__init__.py',
  'codegen.py',
  'codegen_main.py',
  'codegen_docbook.py',
  'dbustypes.py',
  'parser.py',
  'utils.py',
]

gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('PYTHON', python.path())
gdbus_codegen_conf.set('DATADIR', glib_datadir)

# Install gdbus-codegen executable
gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
  output : 'gdbus-codegen',
  install : true,
  install_dir : get_option('bindir'),
  configuration : gdbus_codegen_conf
)
  # Provide tools for others when we're a subproject and they use the Meson GNOME module
meson.override_find_program('gdbus-codegen', gdbus_codegen)

codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen')

gdbus_codegen_built_files = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
                                            output : 'config.py',
                                            install : true,
                                            install_dir : codegen_dir,
                                            configuration : gdbus_codegen_conf)

foreach f : gdbus_codegen_files
  # Copy these into the builddir so that gdbus-codegen can be used uninstalled
  # and then install it too so that it can be used after installation
  gdbus_codegen_built_files += configure_file(input : f, output : f,
                                              install : true,
                                              install_dir : codegen_dir,
                                              copy : true)
endforeach