-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathmeson.build
101 lines (93 loc) · 2.14 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
project('sane-airscan', 'c', 'cpp')
sources = [
'airscan-array.c',
'airscan-bmp.c',
'airscan-conf.c',
'airscan-devcaps.c',
'airscan-device.c',
'airscan-devid.c',
'airscan-devops.c',
'airscan-eloop.c',
'airscan-escl.c',
'airscan-filter.c',
'airscan-http.c',
'airscan-id.c',
'airscan-image.c',
'airscan-inifile.c',
'airscan-init.c',
'airscan-ip.c',
'airscan-jpeg.c',
'airscan-log.c',
'airscan-math.c',
'airscan-mdns.c',
'airscan-memstr.c',
'airscan-netif.c',
'airscan-os.c',
'airscan-png.c',
'airscan-pollable.c',
'airscan-rand.c',
'airscan-trace.c',
'airscan-tiff.c',
'airscan-uuid.c',
'airscan-wsd.c',
'airscan-wsdd.c',
'airscan-xml.c',
'airscan-zeroconf.c',
'airscan.c',
'http_parser.c',
'sane_strstatus.c',
]
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : false)
shared_deps = [
m_dep,
dependency('avahi-client'),
dependency('gnutls'),
dependency('libjpeg'),
dependency('libpng'),
dependency('libtiff-4'),
dependency('libxml-2.0'),
dependency('threads'),
]
shared_library(
meson.project_name(),
sources,
version: '1',
dependencies: shared_deps,
link_args : [
'-Wl,-z,nodelete',
'-Wl,--version-script=' + join_paths(meson.current_source_dir(), 'airscan.sym')
],
link_depends : [ 'airscan.sym' ],
install : true,
install_dir : join_paths(get_option('libdir'), 'sane')
)
executable(
'airscan-discover',
sources + ['discover.c'],
dependencies: shared_deps,
install: true
)
dll_file = configure_file(
input : 'dll.conf',
output: 'airscan',
copy: true
)
foreach fuzzer : ['query', 'uri', 'xml']
executable(
'fuzzer-' + fuzzer,
sources + ['fuzzer/@[email protected]'.format(fuzzer)],
dependencies: shared_deps,
build_by_default: false,
cpp_args: ['-fsanitize=address', '-fsanitize=fuzzer-no-link'],
link_args: ['-fsanitize=address', '-fsanitize=fuzzer']
)
endforeach
install_man('sane-airscan.5')
install_man('airscan-discover.1')
install_data('airscan.conf',
install_dir: join_paths(get_option('sysconfdir'), 'sane.d')
)
install_data(dll_file,
install_dir: join_paths(get_option('sysconfdir'), 'sane.d', 'dll.d')
)