-
Notifications
You must be signed in to change notification settings - Fork 27
/
meson.build
145 lines (130 loc) · 4.94 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
project('mconnect', 'vala', 'c')
# dependencies
glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
gio_dep = dependency('gio-2.0')
gio_unix_dep = dependency('gio-unix-2.0')
json_glib_dep = dependency('json-glib-1.0')
gee_dep = dependency('gee-0.8')
libnotify_dep = dependency('libnotify')
gdk_dep = dependency('gdk-3.0')
gtk_dep = dependency('gtk+-3.0')
atspi_dep = dependency('atspi-2')
gnutls_dep = dependency('gnutls')
posix_dep = meson.get_compiler('vala').find_library('posix')
add_project_arguments(['--vapidir',
join_paths(meson.current_source_dir(), 'vapi')],
language: 'vala')
# binaries
mconnect_src = [
'src/mconnect/main.vala',
'src/mconnect/discovery.vala',
'src/mconnect/packet.vala',
'src/mconnect/device.vala',
'src/mconnect/discovereddevice.vala',
'src/mconnect/device-proxy.vala',
'src/mconnect/devicemanager.vala',
'src/mconnect/devicemanager-proxy.vala',
'src/mconnect/devicechannel.vala',
'src/mconnect/core.vala',
'src/mconnect/packethandlerinterface.vala',
'src/mconnect/packethandlerinterface-proxy.vala',
'src/mconnect/packethandlers.vala',
'src/mconnect/packethandlers-proxy.vala',
'src/mconnect/notification.vala',
'src/mconnect/battery.vala',
'src/mconnect/battery-proxy.vala',
'src/mconnect/telephony.vala',
'src/mconnect/telephony-proxy.vala',
'src/mconnect/mousepad.vala',
'src/mconnect/ping.vala',
'src/mconnect/ping-proxy.vala',
'src/mconnect/config.vala',
'src/mconnect/application.vala',
'src/mconnect/utils.vala',
'src/mconnect/property-proxy.vala',
'src/mconnect/share.vala',
'src/mconnect/share-proxy.vala',
'src/mconnect/mpris.vala',
'src/mconnect/mpris-proxies.vala',
'src/mconnect/io-job.vala',
'src/mconnect/transfer-manager.vala',
'src/mconnect/transfer-manager-proxy.vala',
'src/mconnect/transfer-interface.vala',
'src/mconnect/transfer-proxy.vala',
'src/mconnect/transfer-download.vala',
'src/mconnect/transfer-upload.vala',
'src/mconnect/logging.vala',
'src/crypt/certificate.vala',
]
mconnect_prog = executable('mconnect', mconnect_src,
dependencies : [glib_dep, gobject_dep,
gio_dep, gio_unix_dep,
json_glib_dep, gee_dep,
libnotify_dep, gdk_dep,
atspi_dep, gnutls_dep,
posix_dep, gtk_dep],
install: true)
mconnectctl_src = [
'src/mconnectctl/main.vala',
'src/mconnectctl/device-manager-iface.vala',
'src/mconnectctl/device-iface.vala',
'src/mconnectctl/share-iface.vala',
'src/mconnectctl/telephony-iface.vala',
]
executable('mconnectctl', mconnectctl_src,
dependencies : [glib_dep, gobject_dep,
gio_dep, gio_unix_dep],
install: true)
# tests
test_mconn_crypt_src = [
'test/mconn-crypt-vala-test.vala',
'src/crypt/certificate.vala',
]
test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
dependencies: [
glib_dep, gobject_dep,
gio_dep, gio_unix_dep,
gnutls_dep, posix_dep,
],
install: false)
test('mconn-crypt', test_mconn_crypt)
test_mconn_utils_src = [
'test/mconn-utils-test.vala',
'src/mconnect/utils.vala',
'src/mconnect/logging.vala',
]
test_mconn_utils = executable('test-mconn-utils', test_mconn_utils_src,
dependencies: [
glib_dep, gobject_dep,
gio_dep, gio_unix_dep,
posix_dep, libnotify_dep,
],
install: false)
test('mconn-utils', test_mconn_utils)
# other files
applicationsdir = join_paths(get_option('datadir'),
'applications')
conf = configuration_data()
conf.set('bindir',
join_paths(get_option('prefix'), get_option('bindir')))
configure_file(output: 'mconnect.desktop',
input: 'mconnect.desktop.in',
configuration: conf)
install_data(join_paths(meson.current_build_dir(), 'mconnect.desktop'),
install_dir: applicationsdir,
install_mode: 'rw-r--r--')
mconnectdatadir = join_paths(get_option('datadir'),
'mconnect')
install_data('mconnect.conf',
install_dir: mconnectdatadir,
install_mode: 'rw-r--r--')
# other targets
gdb_conf = configuration_data()
gdb_conf.set('bindir', meson.build_root())
gdb_script = configure_file(output: 'gdb-script',
input: 'gdb-script.in',
configuration: gdb_conf)
run_target('run-gdb',
command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
depends: [mconnect_prog])