summaryrefslogtreecommitdiff
path: root/src/ch/meson.build
blob: 66b77907b0dfcf921a5898e29495afa7ad5d81ca (plain)
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
ch_driver_sources = [
  'ch_conf.c',
  'ch_conf.h',
  'ch_domain.c',
  'ch_domain.h',
  'ch_driver.c',
  'ch_driver.h',
  'ch_monitor.c',
  'ch_monitor.h',
  'ch_process.c',
  'ch_process.h',
]

driver_source_files += files(ch_driver_sources)

stateful_driver_source_files += files(ch_driver_sources)

if conf.has('WITH_CH')
  ch_driver_impl = static_library(
    'virt_driver_ch_impl',
    [
      ch_driver_sources,
    ],
    dependencies: [
      access_dep,
      curl_dep,
      log_dep,
      src_dep,
    ],
    include_directories: [
      conf_inc_dir,
      hypervisor_inc_dir,
    ],
  )

  virt_modules += {
    'name': 'virt_driver_ch',
    'link_whole': [
      ch_driver_impl,
    ],
    'link_args': [
      libvirt_no_undefined,
    ],
  }

  virt_daemons += {
    'name': 'virtchd',
    'c_args': [
      '-DDAEMON_NAME="virtchd"',
      '-DMODULE_NAME="ch"',
    ],
  }

  virt_daemon_confs += {
    'name': 'virtchd',
  }

  virt_daemon_units += {
    'service': 'virtchd',
    'service_in': files('virtchd.service.in'),
    'name': 'Libvirt ch',
    'sockprefix': 'virtchd',
    'sockets': [ 'main', 'ro', 'admin' ],
  }

  virt_install_dirs += [
    localstatedir / 'lib' / 'libvirt' / 'ch',
    localstatedir / 'log' / 'libvirt' / 'ch',
    runstatedir / 'libvirt' / 'ch',
  ]
endif