build with Meson instead of autotools
[ncmpc-debian.git] / src / win / meson.build
1 splitted_version = meson.project_version().split('.')
2
3 wconf = configuration_data()
4 wconf.set('VERSION_MAJOR', splitted_version[0])
5 wconf.set('VERSION_MINOR', splitted_version[1])
6 if splitted_version.length() >= 3
7   wconf.set('VERSION_REVISION', splitted_version[2])
8 else
9   wconf.set('VERSION_REVISION', '0')
10 endif
11 if splitted_version.length() >= 4
12   wconf.set('VERSION_EXTRA', splitted_version[3])
13 else
14   wconf.set('VERSION_EXTRA', '0')
15 endif
16 configure_file(input: 'ncmpc_win32_rc.rc.in', output: 'ncmpc_win32_rc.rc', configuration: wconf)
17
18 windows = import('windows')
19 sources += windows.compile_resources('ncmpc_win32_rc.rc')