-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
68 lines (57 loc) · 1.28 KB
/
meson.build
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
project(
'Example',
['c', 'vala'],
version: '1.0',
meson_version: '>= 0.50.0',
)
add_global_arguments([
'-Wno-unused',
'-Wno-discarded-qualifiers'
], language: 'c')
gnome = import('gnome')
name = meson.project_name()
version = meson.project_version()
output = name.to_lower()
subdir('data')
subdir('src')
# Windows related build targets
if host_machine.system() == 'windows'
dist_script_conf = configuration_data()
dist_script_conf.set_quoted('EXECUTABLE_NAME', project_output)
dist_script = configure_file(
input: 'build-aux/win_dist.sh.in',
output: 'win_dist.sh',
configuration: dist_script_conf
)
win_dist = custom_target(
'win-dist',
input: dist_script,
output: 'some.txt',
command: [
'sh',
'@INPUT@'
],
build_by_default: false,
depends: app
)
installer_conf = configuration_data()
installer_conf.set('PROJECT_NAME', name)
installer_conf.set('EXECUTABLE_NAME', output)
installer_conf.set('PROJECT_VERSION', version)
installer = configure_file(
input: 'build-aux/installer.nsi.in',
output: 'installer.nsi',
configuration: installer_conf
)
custom_target(
'win-installer',
input: installer,
output: '@0@ Setup.exe'.format(name),
command: [
'makensis',
'@INPUT@'
],
build_by_default: false,
depends: win_dist
)
endif