| 
									
										
										
										
											2019-01-08 12:18:45 +01:00
										 |  |  | project('pipewire', ['c' ],
 | 
					
						
							| 
									
										
										
										
											2021-12-16 09:17:48 +01:00
										 |  |  |   version : '0.3.42',
 | 
					
						
							| 
									
										
										
										
											2021-05-14 12:09:33 +02:00
										 |  |  |   license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ],
 | 
					
						
							| 
									
										
										
										
											2021-12-28 16:37:53 +01:00
										 |  |  |   meson_version : '>= 0.56.0',
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  |   default_options : [ 'warning_level=3',
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |                       'c_std=gnu99',
 | 
					
						
							| 
									
										
										
										
											2021-12-24 17:56:37 +01:00
										 |  |  |                       'cpp_std=c++17',
 | 
					
						
							| 
									
										
										
										
											2021-01-14 16:29:32 +01:00
										 |  |  |                       'b_pie=true',
 | 
					
						
							| 
									
										
										
										
											2021-09-30 10:01:43 +10:00
										 |  |  |                       #'b_sanitize=address,undefined',
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |                       'buildtype=debugoptimized' ])
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | pipewire_version = meson.project_version()
 | 
					
						
							|  |  |  | version_arr = pipewire_version.split('.')
 | 
					
						
							|  |  |  | pipewire_version_major = version_arr[0]
 | 
					
						
							|  |  |  | pipewire_version_minor = version_arr[1]
 | 
					
						
							|  |  |  | pipewire_version_micro = version_arr[2]
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | if version_arr.length() == 4
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  |   pipewire_version_nano = version_arr[3]
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | else
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  |   pipewire_version_nano = 0
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-29 15:51:41 +01:00
										 |  |  | spaversion = '0.2'
 | 
					
						
							| 
									
										
										
										
											2018-12-14 14:12:40 +02:00
										 |  |  | apiversion = '0.3'
 | 
					
						
							|  |  |  | soversion = 0
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | libversion = '@0@.@1@.0'.format(soversion, pipewire_version_minor.to_int() * 100 + pipewire_version_micro.to_int())
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-05 16:28:22 +01:00
										 |  |  | pipewire_name = 'pipewire-@0@'.format(apiversion)
 | 
					
						
							|  |  |  | spa_name = 'spa-@0@'.format(spaversion)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | prefix = get_option('prefix')
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | pipewire_bindir = prefix / get_option('bindir')
 | 
					
						
							|  |  |  | pipewire_datadir = prefix / get_option('datadir')
 | 
					
						
							|  |  |  | pipewire_libdir = prefix / get_option('libdir')
 | 
					
						
							|  |  |  | pipewire_libexecdir = prefix / get_option('libexecdir')
 | 
					
						
							|  |  |  | pipewire_localedir = prefix / get_option('localedir')
 | 
					
						
							|  |  |  | pipewire_sysconfdir = prefix / get_option('sysconfdir')
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | pipewire_configdir = pipewire_sysconfdir / 'pipewire'
 | 
					
						
							| 
									
										
										
										
											2021-05-17 16:22:31 +02:00
										 |  |  | pipewire_confdatadir = pipewire_datadir / 'pipewire'
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | modules_install_dir = pipewire_libdir / pipewire_name
 | 
					
						
							| 
									
										
										
										
											2020-06-03 11:03:35 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | if host_machine.system() == 'linux'
 | 
					
						
							|  |  |  |   # glibc ld.so interprets ${LIB} in a library loading path with an
 | 
					
						
							|  |  |  |   # appropriate value for the current architecture, typically something
 | 
					
						
							|  |  |  |   # like lib, lib64 or lib/x86_64-linux-gnu.
 | 
					
						
							| 
									
										
										
										
											2020-12-17 15:44:49 +01:00
										 |  |  |   # This allows the same pw-jack script to work for both 32- and 64-bit
 | 
					
						
							| 
									
										
										
										
											2020-06-03 11:03:35 +01:00
										 |  |  |   # applications on biarch/multiarch distributions, by setting something
 | 
					
						
							| 
									
										
										
										
											2020-12-17 15:44:49 +01:00
										 |  |  |   # like LD_LIBRARY_PATH='/usr/${LIB}/pipewire-0.3/jack'.
 | 
					
						
							| 
									
										
										
										
											2020-06-03 11:03:35 +01:00
										 |  |  |   # Note that ${LIB} is a special token expanded by the runtime linker,
 | 
					
						
							|  |  |  |   # not an environment variable, and must be passed through literally.
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  |   modules_install_dir_dlopen = prefix / '${LIB}' / pipewire_name
 | 
					
						
							| 
									
										
										
										
											2020-06-03 11:03:35 +01:00
										 |  |  | else
 | 
					
						
							|  |  |  |   modules_install_dir_dlopen = modules_install_dir
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | spa_plugindir = pipewire_libdir / spa_name
 | 
					
						
							| 
									
										
										
										
											2021-09-18 12:32:29 +03:00
										 |  |  | spa_datadir = pipewire_datadir / spa_name
 | 
					
						
							| 
									
										
										
										
											2020-07-28 12:30:32 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
 | 
					
						
							| 
									
										
										
										
											2020-02-05 16:28:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | pipewire_headers_dir = pipewire_name / 'pipewire'
 | 
					
						
							| 
									
										
										
										
											2016-11-22 16:50:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-02 03:22:14 +02:00
										 |  |  | pkgconfig = import('pkgconfig')
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | cc = meson.get_compiler('c')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-28 00:28:47 +01:00
										 |  |  | common_flags = [
 | 
					
						
							|  |  |  |   '-fvisibility=hidden',
 | 
					
						
							|  |  |  |   '-Werror=suggest-attribute=format',
 | 
					
						
							|  |  |  |   '-Wsign-compare',
 | 
					
						
							|  |  |  |   '-Wpointer-arith',
 | 
					
						
							|  |  |  |   '-Wpointer-sign',
 | 
					
						
							|  |  |  |   '-Wformat',
 | 
					
						
							|  |  |  |   '-Wformat-security',
 | 
					
						
							|  |  |  |   '-Wimplicit-fallthrough',
 | 
					
						
							|  |  |  |   '-Wmissing-braces',
 | 
					
						
							|  |  |  |   '-Wtype-limits',
 | 
					
						
							|  |  |  |   '-Wvariadic-macros',
 | 
					
						
							|  |  |  |   '-Wno-missing-field-initializers',
 | 
					
						
							|  |  |  |   '-Wno-unused-parameter',
 | 
					
						
							|  |  |  |   '-Wno-pedantic',
 | 
					
						
							|  |  |  |   '-Wold-style-declaration',
 | 
					
						
							|  |  |  |   '-Wunused-result',
 | 
					
						
							|  |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cc_flags = common_flags + [
 | 
					
						
							| 
									
										
										
										
											2021-06-24 11:26:05 +10:00
										 |  |  |   '-D_GNU_SOURCE',
 | 
					
						
							| 
									
										
										
										
											2020-11-28 00:28:47 +01:00
										 |  |  |   '-DFASTPATH',
 | 
					
						
							|  |  |  | # '-DSPA_DEBUG_MEMCPY',
 | 
					
						
							|  |  |  | ]
 | 
					
						
							|  |  |  | add_project_arguments(cc.get_supported_arguments(cc_flags), language: 'c')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-24 11:26:48 +10:00
										 |  |  | have_cpp = add_languages('cpp', native: false, required : false)
 | 
					
						
							| 
									
										
										
										
											2020-11-28 00:28:47 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | if have_cpp
 | 
					
						
							|  |  |  |   cxx = meson.get_compiler('cpp')
 | 
					
						
							|  |  |  |   cxx_flags = common_flags
 | 
					
						
							|  |  |  |   add_project_arguments(cxx.get_supported_arguments(cxx_flags), language: 'cpp')
 | 
					
						
							| 
									
										
										
										
											2019-01-07 18:02:36 +01:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-27 17:58:48 +01:00
										 |  |  | sse_args = '-msse'
 | 
					
						
							|  |  |  | sse2_args = '-msse2'
 | 
					
						
							|  |  |  | ssse3_args = '-mssse3'
 | 
					
						
							|  |  |  | sse41_args = '-msse4.1'
 | 
					
						
							| 
									
										
										
										
											2019-03-28 16:45:57 +01:00
										 |  |  | fma_args = '-mfma'
 | 
					
						
							|  |  |  | avx_args = '-mavx'
 | 
					
						
							|  |  |  | avx2_args = '-mavx2'
 | 
					
						
							| 
									
										
										
										
											2019-03-27 17:58:48 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | have_sse = cc.has_argument(sse_args)
 | 
					
						
							|  |  |  | have_sse2 = cc.has_argument(sse2_args)
 | 
					
						
							|  |  |  | have_ssse3 = cc.has_argument(ssse3_args)
 | 
					
						
							|  |  |  | have_sse41 = cc.has_argument(sse41_args)
 | 
					
						
							| 
									
										
										
										
											2019-03-28 16:45:57 +01:00
										 |  |  | have_fma = cc.has_argument(fma_args)
 | 
					
						
							|  |  |  | have_avx = cc.has_argument(avx_args)
 | 
					
						
							|  |  |  | have_avx2 = cc.has_argument(avx2_args)
 | 
					
						
							| 
									
										
										
										
											2019-03-27 17:58:48 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-27 08:27:11 -04:00
										 |  |  | have_neon = false
 | 
					
						
							| 
									
										
										
										
											2020-04-03 13:30:08 +02:00
										 |  |  | if host_machine.cpu_family() == 'aarch64'
 | 
					
						
							| 
									
										
										
										
											2020-05-08 22:12:24 +02:00
										 |  |  |   if cc.compiles('''
 | 
					
						
							|  |  |  |     #include <arm_neon.h>
 | 
					
						
							|  |  |  |     int main () {
 | 
					
						
							|  |  |  |       float *s;
 | 
					
						
							|  |  |  |       asm volatile(
 | 
					
						
							| 
									
										
										
										
											2021-09-30 10:01:43 +10:00
										 |  |  |         "      ld1 { v0.4s }, [%[s]], #16\n"
 | 
					
						
							| 
									
										
										
										
											2020-05-08 22:12:24 +02:00
										 |  |  |         "      fcvtzs v0.4s, v0.4s, #31\n"
 | 
					
						
							| 
									
										
										
										
											2021-09-30 10:01:43 +10:00
										 |  |  |         : [s] "+r" (s) : :);
 | 
					
						
							| 
									
										
										
										
											2020-05-08 22:12:24 +02:00
										 |  |  |     }
 | 
					
						
							|  |  |  |     ''',
 | 
					
						
							|  |  |  |     name : 'aarch64 Neon Support')
 | 
					
						
							|  |  |  |       neon_args = []
 | 
					
						
							|  |  |  |       have_neon = true
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2020-04-03 13:30:08 +02:00
										 |  |  | elif cc.has_argument('-mfpu=neon')
 | 
					
						
							| 
									
										
										
										
											2020-05-08 22:12:24 +02:00
										 |  |  |   if cc.compiles('''
 | 
					
						
							|  |  |  |     #include <arm_neon.h>
 | 
					
						
							|  |  |  |     int main () {
 | 
					
						
							|  |  |  |       float *s;
 | 
					
						
							|  |  |  |       asm volatile(
 | 
					
						
							|  |  |  |         "      vld1.32 { q0 }, [%[s]]!\n"
 | 
					
						
							|  |  |  |         "      vcvt.s32.f32 q0, q0, #31\n"
 | 
					
						
							| 
									
										
										
										
											2021-09-30 10:01:43 +10:00
										 |  |  |         : [s] "+r" (s) : :);
 | 
					
						
							| 
									
										
										
										
											2020-05-08 22:12:24 +02:00
										 |  |  |     }
 | 
					
						
							|  |  |  |     ''',
 | 
					
						
							|  |  |  |     args: '-mfpu=neon',
 | 
					
						
							|  |  |  |     name : 'arm Neon Support')
 | 
					
						
							|  |  |  |       neon_args = ['-mfpu=neon']
 | 
					
						
							|  |  |  |       have_neon = true
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2020-03-27 08:27:11 -04:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-06 20:00:58 +01:00
										 |  |  | libatomic = cc.find_library('atomic', required : false)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | test_8_byte_atomic = '''
 | 
					
						
							|  |  |  | #include <stdint.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | int main(void)
 | 
					
						
							|  |  |  | {
 | 
					
						
							|  |  |  |   int64_t eight;
 | 
					
						
							| 
									
										
										
										
											2021-05-21 07:47:46 +02:00
										 |  |  |   __atomic_fetch_add(&eight, 123, __ATOMIC_SEQ_CST);
 | 
					
						
							| 
									
										
										
										
											2020-09-06 20:00:58 +01:00
										 |  |  |   return 0;
 | 
					
						
							|  |  |  | }
 | 
					
						
							|  |  |  | '''
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # We currently assume that libatomic is unnecessary for 4-byte atomic
 | 
					
						
							|  |  |  | # operations on any reasonable architecture.
 | 
					
						
							|  |  |  | if cc.links(
 | 
					
						
							|  |  |  |   test_8_byte_atomic,
 | 
					
						
							| 
									
										
										
										
											2021-05-21 07:47:46 +02:00
										 |  |  |   name : '8-byte __atomic_fetch_add without libatomic')
 | 
					
						
							| 
									
										
										
										
											2020-09-06 20:00:58 +01:00
										 |  |  |   atomic_dep = dependency('', required: false)
 | 
					
						
							|  |  |  | elif cc.links(
 | 
					
						
							|  |  |  |   test_8_byte_atomic,
 | 
					
						
							|  |  |  |   dependencies : libatomic,
 | 
					
						
							| 
									
										
										
										
											2021-05-21 07:47:46 +02:00
										 |  |  |   name : '8-byte __atomic_fetch_add with libatomic')
 | 
					
						
							| 
									
										
										
										
											2020-09-06 20:00:58 +01:00
										 |  |  |   atomic_dep = libatomic
 | 
					
						
							| 
									
										
										
										
											2021-05-21 07:47:46 +02:00
										 |  |  | else
 | 
					
						
							|  |  |  |   error('8-byte atomic operations are required')
 | 
					
						
							| 
									
										
										
										
											2020-09-06 20:00:58 +01:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2020-03-27 08:27:11 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-10 14:22:10 +10:00
										 |  |  | versiondata = configuration_data()
 | 
					
						
							|  |  |  | versiondata.set('PIPEWIRE_VERSION_MAJOR', pipewire_version_major)
 | 
					
						
							|  |  |  | versiondata.set('PIPEWIRE_VERSION_MINOR', pipewire_version_minor)
 | 
					
						
							|  |  |  | versiondata.set('PIPEWIRE_VERSION_MICRO', pipewire_version_micro)
 | 
					
						
							|  |  |  | versiondata.set('PIPEWIRE_VERSION_NANO', pipewire_version_nano)
 | 
					
						
							|  |  |  | versiondata.set_quoted('PIPEWIRE_API_VERSION', apiversion)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | cdata = configuration_data()
 | 
					
						
							| 
									
										
										
										
											2021-05-17 16:22:31 +02:00
										 |  |  | cdata.set_quoted('PIPEWIRE_CONFDATADIR', pipewire_confdatadir)
 | 
					
						
							|  |  |  | cdata.set_quoted('LOCALEDIR', pipewire_localedir)
 | 
					
						
							|  |  |  | cdata.set_quoted('LIBDIR', pipewire_libdir)
 | 
					
						
							|  |  |  | cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 | 
					
						
							| 
									
										
										
										
											2021-10-13 14:08:12 +10:00
										 |  |  | cdata.set_quoted('PACKAGE', 'pipewire')
 | 
					
						
							|  |  |  | cdata.set_quoted('PACKAGE_NAME', 'PipeWire')
 | 
					
						
							|  |  |  | cdata.set_quoted('PACKAGE_STRING', 'PipeWire @0@'.format(pipewire_version))
 | 
					
						
							|  |  |  | cdata.set_quoted('PACKAGE_TARNAME', 'pipewire')
 | 
					
						
							|  |  |  | cdata.set_quoted('PACKAGE_URL', 'https://pipewire.org')
 | 
					
						
							| 
									
										
										
										
											2021-05-17 16:22:31 +02:00
										 |  |  | cdata.set_quoted('PACKAGE_VERSION', pipewire_version)
 | 
					
						
							|  |  |  | cdata.set_quoted('MODULEDIR', modules_install_dir)
 | 
					
						
							|  |  |  | cdata.set_quoted('PIPEWIRE_CONFIG_DIR', pipewire_configdir)
 | 
					
						
							|  |  |  | cdata.set_quoted('PLUGINDIR', spa_plugindir)
 | 
					
						
							| 
									
										
										
										
											2021-09-18 12:32:29 +03:00
										 |  |  | cdata.set_quoted('SPADATADIR', spa_datadir)
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | # FIXME: --with-memory-alignment],[8,N,malloc,pagesize (default is 32)]) option
 | 
					
						
							|  |  |  | cdata.set('MEMORY_ALIGNMENT_MALLOC', 1)
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | cdata.set_quoted('PA_ALSA_PATHS_DIR', alsadatadir / 'paths')
 | 
					
						
							|  |  |  | cdata.set_quoted('PA_ALSA_PROFILE_SETS_DIR', alsadatadir / 'profile-sets')
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-10 13:24:14 +10:00
										 |  |  | if host_machine.endian() == 'big'
 | 
					
						
							|  |  |  |   cdata.set('WORDS_BIGENDIAN', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | check_headers = [['dlfcn.h','HAVE_DLFCN_H'],
 | 
					
						
							|  |  |  |   ['inttypes.h', 'HAVE_INTTYPES_H'],
 | 
					
						
							|  |  |  |   ['memory.h', 'HAVE_MEMORY_H'],
 | 
					
						
							|  |  |  |   ['poll.h', 'HAVE_POLL_H'],
 | 
					
						
							| 
									
										
										
										
											2019-05-17 11:48:46 +02:00
										 |  |  |   ['stddef.h', 'HAVE_STDDEF_H'],
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |   ['stdint.h', 'HAVE_STDINT_H'],
 | 
					
						
							|  |  |  |   ['stdio_ext.h', 'HAVE_STDIO_EXT_H'],
 | 
					
						
							|  |  |  |   ['strings.h', 'HAVE_STRINGS_H'],
 | 
					
						
							|  |  |  |   ['string.h', 'HAVE_STRING_H'],
 | 
					
						
							| 
									
										
										
										
											2021-02-24 19:02:47 +03:00
										 |  |  |   ['sys/mount.h', 'HAVE_SYS_MOUNT_H'],
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |   ['sys/param.h', 'HAVE_SYS_PARAM_H'],
 | 
					
						
							|  |  |  |   ['sys/poll.h', 'HAVE_SYS_POLL_H'],
 | 
					
						
							|  |  |  |   ['sys/prctl.h', 'HAVE_SYS_PRCTL_H'],
 | 
					
						
							| 
									
										
										
										
											2021-03-04 10:57:48 +01:00
										 |  |  |   ['sys/random.h', 'HAVE_SYS_RANDOM_H'],
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |   ['sys/socket.h', 'HAVE_SYS_SOCKET_H'],
 | 
					
						
							|  |  |  |   ['sys/stat.h', 'HAVE_SYS_STAT_H'],
 | 
					
						
							|  |  |  |   ['sys/times.h', 'HAVE_SYS_TIMES_H'],
 | 
					
						
							|  |  |  |   ['sys/time.h', 'HAVE_SYS_TIME_H'],
 | 
					
						
							|  |  |  |   ['sys/types.h', 'HAVE_SYS_TYPES_H'],
 | 
					
						
							|  |  |  |   ['sys/utsname.h', 'HAVE_SYS_UTSNAME_H'],
 | 
					
						
							| 
									
										
										
										
											2021-02-24 19:02:47 +03:00
										 |  |  |   ['sys/vfs.h', 'HAVE_SYS_VFS_H'],
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |   ['sys/wait.h', 'HAVE_SYS_WAIT_H'],
 | 
					
						
							| 
									
										
										
										
											2020-07-31 12:46:58 +02:00
										 |  |  |   ['pwd.h', 'HAVE_PWD_H'],
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  |   ['ucontext.h', 'HAVE_UCONTEXT_H'],
 | 
					
						
							|  |  |  |   ['unistd.h', 'HAVE_UNISTD_H'],
 | 
					
						
							|  |  |  | ]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | foreach h : check_headers
 | 
					
						
							|  |  |  |   if cc.has_header(h.get(0))
 | 
					
						
							|  |  |  |     cdata.set(h.get(1), 1)
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							|  |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if cc.has_function('poll', prefix : '#include<poll.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_POLL', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | if cc.has_function('pselect', prefix : '#include<sys/select.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_PSELECT', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | cdata.set('HAVE_MMAP', 1)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if cc.has_function('posix_memalign', prefix : '#include<stdlib.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_POSIX_MEMALIGN', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | if cc.has_function('getpagesize', prefix : '#include<unistd.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_GETPAGESIZE', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-07-20 12:10:40 -03:00
										 |  |  | if cc.has_function('gettid', prefix : '#include<unistd.h>', args: [ '-D_GNU_SOURCE' ])
 | 
					
						
							|  |  |  |   cdata.set('HAVE_GETTID', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | if cc.has_function('clock_gettime', prefix : '#include <time.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_CLOCK_GETTIME', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-17 11:48:46 +02:00
										 |  |  | if cc.has_type('ptrdiff_t', prefix : '#include <stddef.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_PTRDIFF_T', 1)
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-13 15:32:21 +01:00
										 |  |  | if cc.has_header_symbol('string.h', 'strndupa', args : [ '-D_GNU_SOURCE' ])
 | 
					
						
							| 
									
										
										
										
											2020-11-09 00:40:40 +03:00
										 |  |  |   cdata.set('HAVE_STRNDUPA', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | if cc.has_function('mkstemp', prefix : '#include <stdlib.h>')
 | 
					
						
							|  |  |  |   cdata.set('HAVE_MKSTEMP', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-27 11:58:33 +01:00
										 |  |  | if cc.has_function('memfd_create', prefix : '#include <sys/mman.h>', args : [ '-D_GNU_SOURCE' ])
 | 
					
						
							| 
									
										
										
										
											2017-11-24 17:23:40 +01:00
										 |  |  |   cdata.set('HAVE_MEMFD_CREATE', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-24 22:08:07 +02:00
										 |  |  | if cc.has_function('getrandom', prefix : '#include <stddef.h>\n#include <sys/random.h>', args : [ '-D_GNU_SOURCE' ])
 | 
					
						
							| 
									
										
										
										
											2021-03-04 10:57:48 +01:00
										 |  |  |   cdata.set('HAVE_GETRANDOM', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-10 08:33:36 +10:00
										 |  |  | if cc.has_function('sigabbrev_np', prefix : '#include <string.h>', args : [ '-D_GNU_SOURCE' ])
 | 
					
						
							|  |  |  |   cdata.set('HAVE_SIGABBREV_NP', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-21 11:42:56 +03:00
										 |  |  | if cc.get_define('SYS_pidfd_open', prefix : '#include <sys/syscall.h>') != ''
 | 
					
						
							| 
									
										
										
										
											2021-06-10 15:12:12 +10:00
										 |  |  |   cdata.set('HAVE_PIDFD_OPEN', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | systemd = dependency('systemd', required: get_option('systemd'))
 | 
					
						
							|  |  |  | systemd_dep = dependency('libsystemd',required: get_option('systemd'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'systemd conf data': systemd.found()}, bool_yn: true)
 | 
					
						
							|  |  |  | summary({'libsystemd': systemd_dep.found()}, bool_yn: true)
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | if systemd.found() and systemd_dep.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_SYSTEMD', 1)
 | 
					
						
							| 
									
										
										
										
											2020-07-22 14:50:38 +02:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | configinc = include_directories('.')
 | 
					
						
							| 
									
										
										
										
											2021-06-07 15:54:09 +10:00
										 |  |  | includes_inc = include_directories('include')
 | 
					
						
							| 
									
										
										
										
											2017-07-11 15:57:20 +02:00
										 |  |  | pipewire_inc = include_directories('src')
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-26 13:04:47 +02:00
										 |  |  | makedata = configuration_data()
 | 
					
						
							| 
									
										
										
										
											2021-12-28 16:35:20 +01:00
										 |  |  | makedata.set('BUILD_ROOT', meson.project_build_root())
 | 
					
						
							|  |  |  | makedata.set('SOURCE_ROOT', meson.project_source_root())
 | 
					
						
							|  |  |  | makedata.set('VERSION', pipewire_version)
 | 
					
						
							| 
									
										
										
										
											2017-06-26 13:04:47 +02:00
										 |  |  | if version_arr.length() == 4
 | 
					
						
							|  |  |  |   makedata.set('TAG', 'HEAD')
 | 
					
						
							|  |  |  | else
 | 
					
						
							|  |  |  |   makedata.set('TAG', pipewire_version)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | configure_file(input : 'Makefile.in',
 | 
					
						
							|  |  |  |   output : 'Makefile',
 | 
					
						
							|  |  |  |   configuration : makedata)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | # Find dependencies
 | 
					
						
							| 
									
										
										
										
											2018-01-24 11:56:08 +00:00
										 |  |  | mathlib = cc.find_library('m', required : false)
 | 
					
						
							|  |  |  | rt_lib = cc.find_library('rt', required : false) # clock_gettime
 | 
					
						
							|  |  |  | dl_lib = cc.find_library('dl', required : false)
 | 
					
						
							|  |  |  | pthread_lib = dependency('threads')
 | 
					
						
							| 
									
										
										
										
											2021-10-09 15:00:04 +02:00
										 |  |  | dbus_dep = dependency('dbus-1', required : get_option('dbus'))
 | 
					
						
							|  |  |  | summary({'dbus (Bluetooth, rtkit, portal, pw-reserve)': dbus_dep.found()}, bool_yn: true, section: 'Misc dependencies')
 | 
					
						
							|  |  |  | if dbus_dep.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_DBUS', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-02-15 11:59:10 +01:00
										 |  |  | sdl_dep = dependency('sdl2', required : get_option('sdl2'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'SDL 2': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
 | 
					
						
							| 
									
										
										
										
											2021-10-23 17:25:13 +02:00
										 |  |  | drm_dep = dependency('libdrm', required : false)
 | 
					
						
							| 
									
										
										
										
											2021-09-27 07:33:19 +10:00
										 |  |  | readline_dep = dependency('readline', required : false)
 | 
					
						
							| 
									
										
										
										
											2021-09-30 23:11:50 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | if not readline_dep.found()
 | 
					
						
							|  |  |  |   readline_dep = cc.find_library('readline', required: false)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-28 17:58:00 +10:00
										 |  |  | summary({'readline (for pw-cli)': readline_dep.found()}, bool_yn: true, section: 'Misc dependencies')
 | 
					
						
							| 
									
										
										
										
											2021-03-25 11:39:29 +03:00
										 |  |  | ncurses_dep = dependency('ncursesw', required : false)
 | 
					
						
							| 
									
										
										
										
											2021-02-15 11:59:10 +01:00
										 |  |  | sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : get_option('sndfile'))
 | 
					
						
							| 
									
										
										
										
											2021-08-12 09:59:56 +02:00
										 |  |  | summary({'sndfile': sndfile_dep.found()}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump/filter-chain')
 | 
					
						
							|  |  |  | if sndfile_dep.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_SNDFILE', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-05-12 15:55:15 +02:00
										 |  |  | pulseaudio_dep = dependency('libpulse', required : get_option('libpulse'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'libpulse': pulseaudio_dep.found()}, bool_yn: true, section: 'Streaming between daemons')
 | 
					
						
							| 
									
										
										
										
											2021-05-13 18:05:26 +02:00
										 |  |  | avahi_dep = dependency('avahi-client', required : get_option('avahi'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'Avahi DNS-SD (Zeroconf)': avahi_dep.found()}, bool_yn: true,
 | 
					
						
							|  |  |  |   section: 'Streaming between daemons')
 | 
					
						
							| 
									
										
										
										
											2017-11-13 20:08:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-13 21:52:41 +03:00
										 |  |  | libusb_dep = dependency('libusb-1.0', required : get_option('libusb'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'libusb (Bluetooth quirks)': libusb_dep.found()}, bool_yn: true, section: 'Backend')
 | 
					
						
							| 
									
										
										
										
											2021-06-13 21:52:41 +03:00
										 |  |  | if libusb_dep.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_LIBUSB', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-10 16:11:43 +10:00
										 |  |  | cap_lib = dependency('libcap', required : false)
 | 
					
						
							|  |  |  | if cap_lib.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_LIBCAP', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | gst_option = get_option('gstreamer')
 | 
					
						
							|  |  |  | gst_deps_def = {
 | 
					
						
							|  |  |  |   'glib-2.0': {'version': '>=2.32.0'},
 | 
					
						
							|  |  |  |   'gobject-2.0': {},
 | 
					
						
							|  |  |  |   'gmodule-2.0': {},
 | 
					
						
							|  |  |  |   'gio-2.0': {},
 | 
					
						
							|  |  |  |   'gio-unix-2.0': {},
 | 
					
						
							|  |  |  |   'gstreamer-1.0': {'version': '>= 1.10.0'},
 | 
					
						
							|  |  |  |   'gstreamer-plugins-base-1.0': {},
 | 
					
						
							|  |  |  |   'gstreamer-video-1.0': {},
 | 
					
						
							|  |  |  |   'gstreamer-audio-1.0': {},
 | 
					
						
							|  |  |  |   'gstreamer-allocators-1.0': {},
 | 
					
						
							|  |  |  | }
 | 
					
						
							| 
									
										
										
										
											2018-06-01 11:38:18 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | gst_dep = []
 | 
					
						
							|  |  |  | foreach depname, kwargs: gst_deps_def
 | 
					
						
							|  |  |  |   dep = dependency(depname, required: gst_option, kwargs: kwargs)
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  |   summary({depname: dep.found()}, bool_yn: true, section: 'GStreamer modules')
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  |   if not dep.found()
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  |     # Beware, there's logic below depending on the array clear here!
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  |     gst_dep = []
 | 
					
						
							|  |  |  |     if get_option('gstreamer-device-provider').enabled()
 | 
					
						
							|  |  |  |       error('`gstreamer-device-provider` is enabled but `@0@` was not found.'.format(depname))
 | 
					
						
							|  |  |  |     endif
 | 
					
						
							|  |  |  |     break
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							|  |  |  |   gst_dep += [dep]
 | 
					
						
							|  |  |  | endforeach
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | # This code relies on the array being empty if any dependency was not found
 | 
					
						
							|  |  |  | gst_dp_found = gst_dep.length() > 0
 | 
					
						
							|  |  |  | summary({'gstreamer-device-provider': gst_dp_found}, bool_yn: true, section: 'Backend')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | if not get_option('gstreamer-device-provider').disabled()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 1)
 | 
					
						
							| 
									
										
										
										
											2017-11-20 11:04:02 +01:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-28 11:28:03 -04:00
										 |  |  | webrtc_dep = dependency('webrtc-audio-processing',
 | 
					
						
							|  |  |  |   version : ['>= 0.2', '< 1.0'],
 | 
					
						
							|  |  |  |   required : get_option('echo-cancel-webrtc'))
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'WebRTC Echo Canceling': webrtc_dep.found()}, bool_yn: true, section: 'Misc dependencies')
 | 
					
						
							| 
									
										
										
										
											2021-05-28 11:28:03 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | if webrtc_dep.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_WEBRTC', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-09 23:03:38 +04:00
										 |  |  | # On FreeBSD, epoll-shim library is required for eventfd() and timerfd()
 | 
					
						
							|  |  |  | epoll_shim_dep = (build_machine.system() == 'freebsd'
 | 
					
						
							|  |  |  |     ? dependency('epoll-shim', required: true)
 | 
					
						
							|  |  |  |     : dependency('', required: false))
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-24 17:18:18 +03:00
										 |  |  | libinotify_dep = (build_machine.system() == 'freebsd'
 | 
					
						
							|  |  |  |     ? dependency('libinotify', required: true)
 | 
					
						
							|  |  |  |     : dependency('', required: false))
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-23 22:57:51 +03:00
										 |  |  | # On FreeBSD, libintl library is required for gettext
 | 
					
						
							| 
									
										
										
										
											2021-09-30 23:11:50 +03:00
										 |  |  | libintl_dep = dependency('intl', required: false)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if not libintl_dep.found()
 | 
					
						
							|  |  |  |     libintl_dep = cc.find_library('intl', required: false)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | summary({'intl support': libintl_dep.found()}, bool_yn: true)
 | 
					
						
							| 
									
										
										
										
											2021-04-23 22:57:51 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-26 12:46:05 +10:00
										 |  |  | need_alsa = get_option('pipewire-alsa').enabled() or 'media-session' in get_option('session-managers')
 | 
					
						
							| 
									
										
										
										
											2021-09-21 08:57:56 +10:00
										 |  |  | alsa_dep = dependency('alsa', version : '>=1.1.7', required: need_alsa)
 | 
					
						
							| 
									
										
										
										
											2021-06-25 06:45:51 +03:00
										 |  |  | summary({'pipewire-alsa': alsa_dep.found()}, bool_yn: true)
 | 
					
						
							| 
									
										
										
										
											2020-03-09 23:08:05 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-24 21:25:11 +03:00
										 |  |  | if build_machine.system() == 'freebsd'
 | 
					
						
							|  |  |  | # On FreeBSD the OpenSSL library may come from base or a package.
 | 
					
						
							|  |  |  | # Check for a package first and fallback to the base library if we can't find it via pkgconfig
 | 
					
						
							|  |  |  |     openssl_lib = dependency('openssl', required: false)
 | 
					
						
							|  |  |  |     if not openssl_lib.found()
 | 
					
						
							|  |  |  |         openssl_lib = declare_dependency(link_args : [ '-lssl', '-lcrypto'])
 | 
					
						
							|  |  |  |     endif
 | 
					
						
							|  |  |  | else
 | 
					
						
							|  |  |  |     openssl_lib = dependency('openssl', required: get_option('raop'))
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-11-12 21:16:52 +02:00
										 |  |  | summary({'OpenSSL (for raop-sink)': openssl_lib.found()}, bool_yn: true)
 | 
					
						
							| 
									
										
										
										
											2021-11-11 11:42:16 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-10 17:44:28 +01:00
										 |  |  | lilv_lib = dependency('lilv-0', required: get_option('lv2'))
 | 
					
						
							|  |  |  | summary({'lilv (for lv2 plugins)': lilv_lib.found()}, bool_yn: true)
 | 
					
						
							| 
									
										
										
										
											2021-12-10 18:46:06 +01:00
										 |  |  | if lilv_lib.found()
 | 
					
						
							|  |  |  |   cdata.set('HAVE_LILV', 1)
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-12-10 17:44:28 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-15 14:41:04 +10:00
										 |  |  | installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name
 | 
					
						
							|  |  |  | installed_tests_execdir = pipewire_libexecdir / 'installed-tests' / pipewire_name
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | installed_tests_enabled = not get_option('installed_tests').disabled()
 | 
					
						
							| 
									
										
										
										
											2020-06-05 14:06:36 +01:00
										 |  |  | installed_tests_template = files('template.test.in')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-27 10:05:19 +10:00
										 |  |  | if not get_option('tests').disabled()
 | 
					
						
							|  |  |  |   gstack = find_program('gstack', required : false)
 | 
					
						
							|  |  |  |   cdata.set10('HAVE_GSTACK', gstack.found())
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-08 10:26:46 +01:00
										 |  |  | subdir('po')
 | 
					
						
							| 
									
										
										
										
											2019-11-09 23:03:38 +04:00
										 |  |  | subdir('spa')
 | 
					
						
							| 
									
										
										
										
											2017-07-11 15:57:20 +02:00
										 |  |  | subdir('src')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-27 10:05:19 +10:00
										 |  |  | if not get_option('tests').disabled()
 | 
					
						
							|  |  |  |   subdir('test')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-10 13:36:31 +10:00
										 |  |  | configure_file(output : 'config.h',
 | 
					
						
							|  |  |  |                configuration : cdata)
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | if not get_option('pipewire-jack').disabled()
 | 
					
						
							| 
									
										
										
										
											2021-03-03 15:48:37 +01:00
										 |  |  |   subdir('pipewire-jack')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2021-10-06 20:24:08 +02:00
										 |  |  | if not get_option('pipewire-v4l2').disabled()
 | 
					
						
							|  |  |  |   subdir('pipewire-v4l2')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-10-19 13:21:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-14 09:53:10 +10:00
										 |  |  | if alsa_dep.found()
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  |   subdir('pipewire-alsa/alsa-plugins')
 | 
					
						
							| 
									
										
										
										
											2020-05-02 10:42:44 +02:00
										 |  |  |   subdir('pipewire-alsa/conf')
 | 
					
						
							| 
									
										
										
										
											2021-12-15 15:59:46 +01:00
										 |  |  |   subdir('pipewire-alsa/tests')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-10 15:36:27 -03:00
										 |  |  | doxygen = find_program('doxygen', required : get_option('docs'))
 | 
					
						
							|  |  |  | if doxygen.found()
 | 
					
						
							|  |  |  |   subdir('doc')
 | 
					
						
							| 
									
										
										
										
											2017-05-30 19:46:51 +02:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2017-06-16 17:31:40 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-03 10:16:48 +03:00
										 |  |  | if not get_option('man').disabled()
 | 
					
						
							|  |  |  |   rst2man = find_program('rst2man', required: false)
 | 
					
						
							|  |  |  |   if not rst2man.found()
 | 
					
						
							|  |  |  |     rst2man = find_program('rst2man.py', required: get_option('man'))
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							|  |  |  |   summary({'Manpage generation': rst2man.found()}, bool_yn: true)
 | 
					
						
							|  |  |  |   if rst2man.found()
 | 
					
						
							|  |  |  |     subdir('man')
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2017-06-16 17:31:40 +02:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-09-23 06:25:16 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | setenv = find_program('pw-uninstalled.sh')
 | 
					
						
							| 
									
										
										
										
											2021-10-13 14:37:55 +10:00
										 |  |  | run_target('pw-uninstalled',
 | 
					
						
							|  |  |  |   command : [setenv,
 | 
					
						
							| 
									
										
										
										
											2021-12-28 16:35:20 +01:00
										 |  |  |              '-b@0@'.format(meson.project_build_root()),
 | 
					
						
							| 
									
										
										
										
											2021-10-13 14:37:55 +10:00
										 |  |  |              '-v@0@'.format(pipewire_version)]
 | 
					
						
							|  |  |  | )
 | 
					
						
							| 
									
										
										
										
											2021-06-04 17:51:12 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | if meson.version().version_compare('>=0.58.0')
 | 
					
						
							|  |  |  |   devenv = environment()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-28 17:01:08 +01:00
										 |  |  |   builddir = meson.project_build_root()
 | 
					
						
							|  |  |  |   srcdir = meson.project_source_root()
 | 
					
						
							| 
									
										
										
										
											2021-06-04 17:51:12 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('PIPEWIRE_CONFIG_DIR', builddir / 'src' / 'daemon')
 | 
					
						
							|  |  |  |   devenv.set('PIPEWIRE_MODULE_DIR', builddir / 'src' / 'modules')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('SPA_PLUGIN_DIR', builddir / 'spa' / 'plugins')
 | 
					
						
							| 
									
										
										
										
											2021-09-19 20:59:19 +03:00
										 |  |  |   devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins')
 | 
					
						
							| 
									
										
										
										
											2021-06-04 17:51:12 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('GST_PLUGIN_PATH', builddir / 'src'/ 'gst')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('ALSA_PLUGIN_DIR', builddir / 'pipewire-alsa' / 'alsa-plugins')
 | 
					
						
							|  |  |  |   devenv.set('ACP_PATHS_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'paths')
 | 
					
						
							|  |  |  |   devenv.set('ACP_PROFILES_DIR', srcdir / 'spa' / 'plugins' / 'alsa' / 'mixer' / 'profile-sets')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('LD_LIBRARY_PATH', builddir / 'pipewire-jack' / 'src')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   devenv.set('PW_UNINSTALLED', '1')
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   meson.add_devenv(devenv)
 | 
					
						
							|  |  |  | endif
 |