-
Notifications
You must be signed in to change notification settings - Fork 9
/
meson.build
93 lines (76 loc) · 2.36 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
project('ladish', 'c', 'cpp',
version : '1.2',
license : 'GPL-2.0-only')
data_dir = get_option('prefix') / 'share' / 'ladish'
locale_dir = get_option('prefix') / 'share' / 'locale'
dbus_name_base = 'org.ladish'
dbus_base_path = '/org/ladish'
fs = import('fs')
if fs.is_dir('.git')
# This block handles building from git source tree
# version.h is generated during build
git_version = run_command(['git', 'rev-parse', '--short', 'HEAD']).stdout().strip()
configure_file(output : 'version.h',
configuration : {
'GIT_VERSION' : '"@0@"'.format(git_version)
}
)
else
# Tarballs already have version.h,
# Just copy the file in this case
configure_file(output : 'version.h',
input : 'version.h',
copy: true
)
endif
configure_file(output : 'config.h',
configuration : {
'PACKAGE_VERSION' : '"@0@"'.format(meson.project_version()),
'BASE_NAME' : '"@0@"'.format(meson.project_name()),
'DATA_DIR' : '"@0@"'.format(data_dir),
'LOCALE_DIR' : '"@0@"'.format(locale_dir),
'DBUS_NAME_BASE' : '"@0@"'.format(dbus_name_base),
'DBUS_BASE_PATH' : '"@0@"'.format(dbus_base_path),
'_GNU_SOURCE' : 1,
}
)
cc = meson.get_compiler('c')
inc = include_directories(meson.build_root().split('/')[-1])
lash_inc = include_directories('lash_compat/liblash')
jack_dep = dependency('jack')
dbus_dep = dependency('dbus-1')
cdbus_dep = dependency('cdbus-1')
deps = [
cc.find_library('dl'),
cc.find_library('util'),
dbus_dep,
cdbus_dep,
jack_dep,
dependency('alsa'),
dependency('uuid'),
dependency('expat')
]
pkg_mod = import('pkgconfig')
subdir('common')
subdir('proxies')
subdir('alsapid')
# ladishd
subdir('daemon')
if get_option('liblash').enabled()
subdir('lash_compat/liblash')
endif
if get_option('gladish').enabled()
subdir('gui')
subdir('art')
endif
install_data(['AUTHORS', 'README.adoc', 'NEWS'], install_dir : data_dir)
install_data('ladish_control',
install_dir : get_option('prefix') / 'bin')
jmcore = executable('jmcore', 'jmcore.c',
dependencies : deps,
link_with : [commonlib],
install : true)
ladiconfd = executable('ladiconfd', 'conf.c',
dependencies : deps,
link_with : [commonlib],
install : true)