meson.build 2.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
data_inc = include_directories('.')

schemas = [
  'org.gnome.settings-daemon.peripherals.gschema.xml',
  'org.gnome.settings-daemon.peripherals.wacom.gschema.xml',
  'org.gnome.settings-daemon.plugins.gschema.xml',
  'org.gnome.settings-daemon.plugins.color.gschema.xml',
  'org.gnome.settings-daemon.plugins.housekeeping.gschema.xml',
  'org.gnome.settings-daemon.plugins.media-keys.gschema.xml',
  'org.gnome.settings-daemon.plugins.power.gschema.xml',
  'org.gnome.settings-daemon.plugins.sharing.gschema.xml',
  'org.gnome.settings-daemon.plugins.xsettings.gschema.xml'
]

Guido Günther's avatar
Guido Günther committed
15 16 17 18
if enable_wwan
  schemas += 'org.gnome.settings-daemon.plugins.wwan.gschema.xml'
endif

19 20 21
schema_conf = configuration_data()
schema_conf.set('GETTEXT_PACKAGE', meson.project_name())

22
schemas_xml = []
23
foreach schema: schemas
24
  schemas_xml += [configure_file(
25
    input: schema + '.in',
26
    output: schema,
27
    configuration: schema_conf,
28 29
    install: true,
    install_dir: gsd_schemadir
30
  )]
31 32 33 34
endforeach

enums_header = files('gsd-enums.h')

35
mkenums = gnome.mkenums(
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  'org.gnome.settings-daemon.enums.xml',
  sources: enums_header,
  comments: '<!-- @comment@ -->',
  fhead: '<schemalist>',
  vhead: '  <@type@ id="org.gnome.settings-daemon.@EnumName@">',
  vprod: '    <value nick="@valuenick@" value="@valuenum@"/>',
  vtail: '  </@type@>',
  ftail: '</schemalist>',
  install_header: true,
  install_dir: gsd_schemadir
)

install_data(
  enums_header,
  install_dir: join_paths(gsd_pkgincludedir, meson.project_name())
)

install_data(
  'gnome-settings-daemon.convert',
  install_dir: join_paths(gsd_datadir, 'GConf', 'gsettings')
)

pkg.generate(
  version: gsd_version,
  name: meson.project_name(),
  description: meson.project_name() + ' specific enumerations',
  filebase: meson.project_name(),
  subdirs: gsd_api_name
)
65 66 67 68 69 70 71 72 73


# for unit tests - gnome.compile_schemas() only looks in srcdir
custom_target('compile-schemas',
  input: schemas_xml,
  depends: mkenums,
  output: 'gschemas.compiled',
  command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
  build_by_default: true)