summaryrefslogtreecommitdiff
path: root/src/haiku/meson.build
blob: 390ecff17aad14717e8714b2e02965c84aa526ed (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
haiku_conf = configuration_data()
haiku_conf.set('VERSION', meson.project_version())

splitted_version = meson.project_version().split('~')[0].split('.')
haiku_conf.set('VERSION_MAJOR', splitted_version[0])
haiku_conf.set('VERSION_MINOR', splitted_version.get(1, '0'))
haiku_conf.set('VERSION_REVISION', splitted_version.get(2, '0'))
haiku_conf.set('VERSION_EXTRA', splitted_version.get(3, '0'))

mpd_rdef = configure_file(
  input: 'mpd.rdef.in',
  output: 'mpd.rdef',
  configuration: haiku_conf,
)

rc = find_program('rc')
xres = find_program('xres')

rsrc = custom_target(
  'mpd.rsrc',
  output: 'mpd.rsrc',
  input: mpd_rdef,
  command: [rc, '-o', '@OUTPUT@', '@INPUT@'],
)

addres = files('add_resources.sh')