1haiku_conf = configuration_data()
2haiku_conf.set('VERSION', meson.project_version())
3
4splitted_version = meson.project_version().split('~')[0].split('.')
5haiku_conf.set('VERSION_MAJOR', splitted_version[0])
6haiku_conf.set('VERSION_MINOR', splitted_version.get(1, '0'))
7haiku_conf.set('VERSION_REVISION', splitted_version.get(2, '0'))
8haiku_conf.set('VERSION_EXTRA', splitted_version.get(3, '0'))
9
10mpd_rdef = configure_file(
11  input: 'mpd.rdef.in',
12  output: 'mpd.rdef',
13  configuration: haiku_conf,
14)
15
16rc = find_program('rc')
17xres = find_program('xres')
18
19rsrc = custom_target(
20  'mpd.rsrc',
21  output: 'mpd.rsrc',
22  input: mpd_rdef,
23  command: [rc, '-o', '@OUTPUT@', '@INPUT@'],
24)
25
26addres = files('add_resources.sh')
27