summaryrefslogtreecommitdiff
path: root/src/pipewire/meson.build
blob: db28f3774badb8170522483edb817e4b5fb7e001 (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
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
pipewire_headers = [
  'array.h',
  'buffers.h',
  'impl-client.h',
  'control.h',
  'context.h',
  'data-loop.h',
  'impl-device.h',
  'filter.h',
  'global.h',
  'interfaces.h',
  'introspect.h',
  'keys.h',
  'impl-link.h',
  'log.h',
  'loop.h',
  'main-loop.h',
  'map.h',
  'mem.h',
  'impl-module.h',
  'impl-node.h',
  'impl-factory.h',
  'permission.h',
  'pipewire.h',
  'impl-port.h',
  'properties.h',
  'protocol.h',
  'proxy.h',
  'core.h',
  'resource.h',
  'stream.h',
  'thread-loop.h',
  'type.h',
  'utils.h',
  'work-queue.h',
]

pipewire_sources = [
  'buffers.c',
  'impl-client.c',
  'control.c',
  'context.c',
  'data-loop.c',
  'impl-device.c',
  'filter.c',
  'global.c',
  'introspect.c',
  'impl-link.c',
  'log.c',
  'loop.c',
  'main-loop.c',
  'mem.c',
  'impl-module.c',
  'impl-node.c',
  'impl-factory.c',
  'pipewire.c',
  'impl-port.c',
  'properties.c',
  'protocol.c',
  'proxy.c',
  'core.c',
  'resource.c',
  'stream.c',
  'thread-loop.c',
  'utils.c',
  'work-queue.c',
]

configure_file(input : 'version.h.in',
  output : 'version.h',
  install_dir : join_paths(get_option('includedir'), 'pipewire'),
  configuration : cdata)

install_headers(pipewire_headers, subdir : 'pipewire')

libpipewire_c_args = [
  '-DHAVE_CONFIG_H',
]

if build_machine.system() != 'freebsd'
  libpipewire_c_args += [
    '-D_GNU_SOURCE',
    '-D_POSIX_C_SOURCE'
  ]
endif

libpipewire_name = 'pipewire-@0@'.format(apiversion)
libpipewire = shared_library(libpipewire_name, pipewire_sources,
  version : libversion,
  soversion : soversion,
  c_args : libpipewire_c_args,
  include_directories : [pipewire_inc, configinc, spa_inc],
  install : true,
  dependencies : [dl_lib, mathlib, pthread_lib, ],
)

pipewire_dep = declare_dependency(link_with : libpipewire,
  include_directories : [pipewire_inc, configinc, spa_inc],
  dependencies : [pthread_lib, ],
)

pkgconfig.generate(filebase : 'lib@0@'.format(libpipewire_name),
  libraries : [libpipewire],
  name : 'libpipewire',
  description : 'PipeWire Interface',
  version : pipewire_version,
  extra_cflags : '-D_REENTRANT',
  variables : ['moduledir=${libdir}/@0@'.format(libpipewire_name)])