| 1 |
wp_lib_sources = files( |
| 2 |
'base-dirs.c', |
| 3 |
'client.c', |
| 4 |
'component-loader.c', |
| 5 |
'conf.c', |
| 6 |
'core.c', |
| 7 |
'device.c', |
| 8 |
'error.c', |
| 9 |
'event.c', |
| 10 |
'event-dispatcher.c', |
| 11 |
'event-hook.c', |
| 12 |
'factory.c', |
| 13 |
'global-proxy.c', |
| 14 |
'iterator.c', |
| 15 |
'json-utils.c', |
| 16 |
'link.c', |
| 17 |
'log.c', |
| 18 |
'metadata.c', |
| 19 |
'settings.c', |
| 20 |
'module.c', |
| 21 |
'node.c', |
| 22 |
'object.c', |
| 23 |
'object-interest.c', |
| 24 |
'object-manager.c', |
| 25 |
'plugin.c', |
| 26 |
'port.c', |
| 27 |
'proc-utils.c', |
| 28 |
'properties.c', |
| 29 |
'proxy.c', |
| 30 |
'proxy-interfaces.c', |
| 31 |
'session-item.c', |
| 32 |
'si-factory.c', |
| 33 |
'si-interfaces.c', |
| 34 |
'spa-json.c', |
| 35 |
'spa-pod.c', |
| 36 |
'spa-type.c', |
| 37 |
'state.c', |
| 38 |
'transition.c', |
| 39 |
'wp.c', |
| 40 |
) |
| 41 |
|
| 42 |
wp_lib_priv_sources = files( |
| 43 |
'private/pipewire-object-mixin.c', |
| 44 |
'private/internal-comp-loader.c', |
| 45 |
'private/registry.c', |
| 46 |
) |
| 47 |
|
| 48 |
wp_lib_headers = files( |
| 49 |
'base-dirs.h', |
| 50 |
'client.h', |
| 51 |
'component-loader.h', |
| 52 |
'conf.h', |
| 53 |
'core.h', |
| 54 |
'defs.h', |
| 55 |
'device.h', |
| 56 |
'error.h', |
| 57 |
'event.h', |
| 58 |
'event-dispatcher.h', |
| 59 |
'event-hook.h', |
| 60 |
'global-proxy.h', |
| 61 |
'iterator.h', |
| 62 |
'json-utils.h', |
| 63 |
'link.h', |
| 64 |
'log.h', |
| 65 |
'metadata.h', |
| 66 |
'settings.h', |
| 67 |
'module.h', |
| 68 |
'node.h', |
| 69 |
'object.h', |
| 70 |
'object-interest.h', |
| 71 |
'object-manager.h', |
| 72 |
'plugin.h', |
| 73 |
'port.h', |
| 74 |
'proc-utils.h', |
| 75 |
'properties.h', |
| 76 |
'proxy.h', |
| 77 |
'proxy-interfaces.h', |
| 78 |
'session-item.h', |
| 79 |
'si-factory.h', |
| 80 |
'si-interfaces.h', |
| 81 |
'spa-json.h', |
| 82 |
'spa-pod.h', |
| 83 |
'spa-type.h', |
| 84 |
'state.h', |
| 85 |
'transition.h', |
| 86 |
'wp.h', |
| 87 |
'factory.h', |
| 88 |
) |
| 89 |
|
| 90 |
install_headers(wp_lib_headers, |
| 91 |
install_dir : wireplumber_headers_dir |
| 92 |
) |
| 93 |
|
| 94 |
enums = gnome.mkenums_simple('wpenums', |
| 95 |
sources: wp_lib_headers, |
| 96 |
header_prefix: '#include "wp/defs.h"', |
| 97 |
decorator: 'WP_API', |
| 98 |
install_header: true, |
| 99 |
install_dir: wireplumber_headers_dir, |
| 100 |
) |
| 101 |
wpenums_h = enums[1] |
| 102 |
wpenums_c = enums[0] |
| 103 |
wp_gen_sources = [wpenums_h] |
| 104 |
wpenums_include_dir = include_directories('.') |
| 105 |
|
| 106 |
wpversion_data = configuration_data() |
| 107 |
wpversion_data.set('version', meson.project_version()) |
| 108 |
wpversion_data.set('api_version', wireplumber_api_version) |
| 109 |
wpversion = configure_file( |
| 110 |
input : 'wpversion.h.in', |
| 111 |
output : 'wpversion.h', |
| 112 |
configuration : wpversion_data, |
| 113 |
install_dir: wireplumber_headers_dir |
| 114 |
) |
| 115 |
wp_gen_sources += [wpversion] |
| 116 |
|
| 117 |
wpbuildbasedirs_data = configuration_data() |
| 118 |
wpbuildbasedirs_data.set('BUILD_SYSCONFDIR', '"@0@"'.format(get_option('prefix') / get_option('sysconfdir'))) |
| 119 |
wpbuildbasedirs_data.set('BUILD_DATADIR', '"@0@"'.format(get_option('prefix') / get_option('datadir'))) |
| 120 |
wpbuildbasedirs_data.set('BUILD_LIBDIR', '"@0@"'.format(get_option('prefix') / get_option('libdir'))) |
| 121 |
wpbuildbasedirs_data.set('BUILD_LOCALEDIR', '"@0@"'.format(get_option('prefix') / get_option('localedir'))) |
| 122 |
wpbuildbasedirs = configure_file ( |
| 123 |
output : 'wpbuildbasedirs.h', |
| 124 |
configuration : wpbuildbasedirs_data, |
| 125 |
) |
| 126 |
|
| 127 |
wp_lib = library('wireplumber-' + wireplumber_api_version, |
| 128 |
wp_lib_sources, wp_lib_priv_sources, wpenums_c, wpenums_h, wpversion, wpbuildbasedirs, |
| 129 |
c_args : [ |
| 130 |
'-DBUILDING_WP', |
| 131 |
], |
| 132 |
install: true, |
| 133 |
include_directories: wp_lib_include_dir, |
| 134 |
dependencies : [gobject_dep, gmodule_dep, gio_dep, pipewire_dep, libintl_dep], |
| 135 |
soversion: wireplumber_so_version, |
| 136 |
version: wireplumber_libversion, |
| 137 |
) |
| 138 |
|
| 139 |
wp_dep = declare_dependency( |
| 140 |
link_with: wp_lib, |
| 141 |
sources: wp_gen_sources, |
| 142 |
include_directories: wp_lib_include_dir, |
| 143 |
dependencies: [gobject_dep, gio_dep] |
| 144 |
) |
| 145 |
|
| 146 |
pkgconfig.generate(wp_lib, |
| 147 |
libraries: [gobject_dep, gio_dep], |
| 148 |
subdirs: 'wireplumber-' + wireplumber_api_version |
| 149 |
) |