summaryrefslogtreecommitdiff
path: root/clients/common/meson.build
blob: bddb9cb62944ec01c0fd66fe428c0702356127d5 (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
72
73
common_inc = include_directories('.')

nm_polkit_listener = files('nm-polkit-listener.c')

deps = [
  libnm_dep,
  libnm_nm_default_dep,
  shared_nm_libnm_core_aux_dep,
]

cflags = clients_cflags + [
  '-DG_LOG_DOMAIN="libnmc"',
]

libnmc_base = static_library(
  'nmc-base',
  sources: files(
    'nm-client-utils.c',
    'nm-secret-agent-simple.c',
    'nm-vpn-helpers.c',
  ),
  dependencies: deps,
  c_args: cflags,
)

libnmc_base_dep = declare_dependency(
  include_directories: common_inc,
  link_with: libnmc_base,
)

settings_docs = 'settings-docs.h'

if enable_introspection
  settings_docs_source = custom_target(
    settings_docs,
    input: nm_property_docs,
    output: settings_docs,
    command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
  )

  test(
    'check-settings-docs',
    find_program(join_paths(source_root, 'tools', 'check-settings-docs.sh')),
    args: [source_root, build_root, 'clients/common/' + settings_docs],
  )
else
  settings_docs_source = configure_file(
    input: settings_docs + '.in',
    output: '@BASENAME@',
    configuration: configuration_data(),
  )
endif

libnmc = static_library(
  'nmc',
  sources: files(
    'nm-meta-setting-access.c',
    'nm-meta-setting-desc.c',
  ) + nm_meta_setting_source + [settings_docs_source],
  dependencies: deps,
  c_args: cflags,
  link_with: libnmc_base,
  link_depends: settings_docs_source,
)

libnmc_dep = declare_dependency(
  include_directories: common_inc,
  link_with: libnmc,
)

if (enable_introspection or enable_nmtui) and enable_tests
  subdir('tests')
endif