-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
68 lines (61 loc) · 1.4 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(
'partup', 'c',
version : '2.2.0',
license : 'GPL-3.0-or-later',
default_options : [
'c_std=c99',
'warning_level=3'
]
)
version_array = meson.project_version().split('.')
version_data = configuration_data({
'PARTUP_VERSION_MAJOR' : version_array[0].to_int(),
'PARTUP_VERSION_MINOR' : version_array[1].to_int(),
'PARTUP_VERSION_MICRO' : version_array[2].to_int(),
'PARTUP_VERSION' : meson.project_version()
})
configure_file(
input : 'src/pu-version.h.in',
output : 'pu-version.h',
configuration : version_data
)
deps = [
dependency('glib-2.0', static : get_option('static-glib'), version : '>=2.66.0'),
dependency('gio-2.0', static : get_option('static-glib'), version : '>=2.66.0'),
dependency('yaml-0.1'),
dependency('libparted'),
dependency('mount'),
dependency('blkid')
]
src = [
'src/pu-checksum.c',
'src/pu-command.c',
'src/pu-config.c',
'src/pu-emmc.c',
'src/pu-error.c',
'src/pu-file.c',
'src/pu-flash.c',
'src/pu-glib-compat.c',
'src/pu-hashtable.c',
'src/pu-log.c',
'src/pu-mount.c',
'src/pu-package.c',
'src/pu-utils.c'
]
exec = executable(
meson.project_name(),
sources : [src, 'src/pu-main.c'],
dependencies : deps,
install : true
)
partup_dep = declare_dependency(
dependencies : deps,
include_directories : ['src'],
sources : src
)
if get_option('doc')
subdir('doc')
endif
if get_option('tests')
subdir('tests')
endif