-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
62 lines (51 loc) · 1.86 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
project('guest-networkizer', 'c')
cc = meson.get_compiler('c')
gnome = import('gnome')
dep_virtqemu = dependency('libvirt-qemu') # TODO Make optionnal dependency
gresources = gnome.compile_resources(
'guest_networkizer', 'gresource.xml',
c_name: 'guest_networkizer_gres'
)
srcs = [
'src/gn-main-window.c',
'src/gn-main-window-add-link-dialog.c',
'src/gn-net.c',
'src/gn-net-load.c',
'src/gn-net-save.c',
'src/gn-node.c',
'src/gn-node-panel.c',
'src/gn-ports.c',
'src/vde-ns.c',
'src/vde-plug-url.c',
'src/vde-plug-url-widget.c',
'src/vde-slirp.c',
'src/vde-slirp-widget.c',
'src/vde-switch.c',
'src/vir-domain-list.c',
'src/vir-node.c',
'src/vir-node-widget.c',
gresources,
]
deps = [
dependency('gtk+-3.0'),
dependency('libvirt-gobject-1.0'),
cc.find_library('m', required: false),
dep_virtqemu,
]
# Static library to avoid rebuilding full source for each tests
exe_lib = static_library('guest-networkizer-lib', srcs, install: false, dependencies: deps)
executable('guest-networkizer', 'src/main.c', export_dynamic: true, install: true, link_whole: exe_lib, dependencies: deps)
test_lib = static_library('test_lib', 'tests/main.c', link_whole: exe_lib, install: false, dependencies: deps, include_directories: include_directories('src'), build_by_default: false)
test_dep = declare_dependency(link_whole: test_lib, dependencies: deps, include_directories: include_directories('src'))
basic_tests = [
'node-detached-panel-ref-check',
]
test_env = {
'G_DEBUG': 'fatal-criticals,fatal-warnings',
}
foreach test_unit: basic_tests
test_prog = executable(test_unit, 'tests/'+test_unit+'.c', export_dynamic: true, install: false, dependencies: test_dep, build_by_default: false)
test(test_unit, test_prog, env: test_env, protocol: 'tap')
endforeach
# Data files
install_data('data/me.d_spirits.guest_networkizer.desktop',install_dir: get_option('datadir')/'applications')