-
Notifications
You must be signed in to change notification settings - Fork 412
/
meson.build
55 lines (43 loc) · 1.3 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
project('Miraclecast',
'c',
version: '1',
meson_version: '>=0.39',
default_options: ['buildtype=debugoptimized', 'c_std=gnu11']
)
add_project_arguments('-D_GNU_SOURCE', language: 'c')
conf_data = configuration_data()
conf_data.set_quoted('BUILD_BINDIR',
join_paths(get_option('prefix'), get_option('bindir'))
)
conf_data.set_quoted('PACKAGE_STRING',
'@0@ @1@'.format(meson.project_name(), meson.project_version())
)
configure_file(output: 'config.h',
configuration: conf_data
)
c_compiler = meson.get_compiler('c')
readline = c_compiler.find_library('readline', required: true)
if readline.found()
add_project_arguments('-DHAVE_READLINE', language: 'c')
endif
if get_option('build-enable-debug')
add_project_arguments('-DBUILD_ENABLE_DEBUG', language: 'c')
endif
if get_option('rely-udev')
add_project_arguments('-DRELY_UDEV', language: 'c')
endif
if get_option('enable-systemd')
add_project_arguments('-DENABLE_SYSTEMD', language: 'c')
libsystemd = dependency('libsystemd')
else
libsystemd = dependency('libelogind')
endif
add_project_arguments('-DIP_BINARY='+get_option('ip-binary'), language: 'c')
glib2 = dependency('glib-2.0')
udev = dependency('libudev')
m = c_compiler.find_library('m', required: false)
subdir('src')
subdir('res')
if get_option('build-tests')
subdir('test')
endif