| 
									
										
										
										
											2019-01-08 12:18:45 +01:00
										 |  |  | project('pipewire', ['c' ],
 | 
					
						
							| 
									
										
										
										
											2020-04-30 17:55:35 +02:00
										 |  |  |   version : '0.3.4',
 | 
					
						
							| 
									
										
										
										
											2019-01-07 18:02:36 +01:00
										 |  |  |   license : 'MIT',
 | 
					
						
							| 
									
										
										
										
											2019-08-20 20:35:41 +02:00
										 |  |  |   meson_version : '>= 0.50.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',
 | 
					
						
							|  |  |  |                       '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')
 | 
					
						
							| 
									
										
										
										
											2017-08-17 18:59:03 +02:00
										 |  |  | pipewire_bindir = join_paths(prefix, get_option('bindir'))
 | 
					
						
							| 
									
										
										
										
											2017-05-30 19:46:51 +02:00
										 |  |  | pipewire_datadir = join_paths(prefix, get_option('datadir'))
 | 
					
						
							|  |  |  | pipewire_libdir = join_paths(prefix, get_option('libdir'))
 | 
					
						
							|  |  |  | pipewire_localedir = join_paths(prefix, get_option('localedir'))
 | 
					
						
							|  |  |  | pipewire_sysconfdir = join_paths(prefix, get_option('sysconfdir'))
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-17 10:18:41 +02:00
										 |  |  | pipewire_configdir = join_paths(pipewire_sysconfdir, 'pipewire')
 | 
					
						
							| 
									
										
										
										
											2020-02-05 16:28:22 +01:00
										 |  |  | modules_install_dir = join_paths(pipewire_libdir, pipewire_name)
 | 
					
						
							|  |  |  | spa_plugindir = join_paths(pipewire_libdir, spa_name)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pipewire_headers_dir = join_paths(pipewire_name, 'pipewire')
 | 
					
						
							| 
									
										
										
										
											2016-11-22 16:50:09 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | gnome = import('gnome')
 | 
					
						
							| 
									
										
										
										
											2018-09-02 03:22:14 +02:00
										 |  |  | pkgconfig = import('pkgconfig')
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-08 12:18:45 +01:00
										 |  |  | have_cpp = add_languages('cpp', required : false)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | cc = meson.get_compiler('c')
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-07 18:02:36 +01:00
										 |  |  | if cc.get_id() == 'gcc'
 | 
					
						
							| 
									
										
										
										
											2019-02-06 13:24:41 +01:00
										 |  |  |   add_global_arguments('-fvisibility=hidden',
 | 
					
						
							|  |  |  | 			'-Wsign-compare',
 | 
					
						
							|  |  |  | 			'-Wimplicit-fallthrough',
 | 
					
						
							|  |  |  | 			'-Wpointer-arith',
 | 
					
						
							| 
									
										
										
										
											2020-05-01 11:05:38 +02:00
										 |  |  | 			'-Wformat',
 | 
					
						
							| 
									
										
										
										
											2019-09-26 17:26:23 +02:00
										 |  |  | 			'-Wformat-security',
 | 
					
						
							| 
									
										
										
										
											2020-02-20 18:20:04 +01:00
										 |  |  | 			'-Werror=suggest-attribute=format',
 | 
					
						
							| 
									
										
										
										
											2020-03-17 11:37:56 +01:00
										 |  |  | 			'-Wmissing-braces',
 | 
					
						
							|  |  |  | 			'-Wtype-limits',
 | 
					
						
							|  |  |  | 			'-Wold-style-declaration',
 | 
					
						
							|  |  |  | 			'-Wvariadic-macros',
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  | 		        '-Wno-missing-field-initializers',
 | 
					
						
							|  |  |  | 		        '-Wno-unused-parameter',
 | 
					
						
							|  |  |  | 			'-Wno-pedantic',
 | 
					
						
							| 
									
										
										
										
											2020-04-30 16:07:23 +02:00
										 |  |  | 			'-Wunused-result',
 | 
					
						
							| 
									
										
										
										
											2020-03-18 15:43:29 +01:00
										 |  |  | 			'-DFASTPATH',
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  | #			'-DSPA_DEBUG_MEMCPY',
 | 
					
						
							| 
									
										
										
										
											2019-02-06 13:24:41 +01:00
										 |  |  | 			language : 'c')
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  |   add_global_arguments('-fvisibility=hidden',
 | 
					
						
							|  |  |  | 			'-Wsign-compare',
 | 
					
						
							|  |  |  | 			'-Wimplicit-fallthrough',
 | 
					
						
							|  |  |  | 			'-Wpointer-arith',
 | 
					
						
							| 
									
										
										
										
											2020-05-01 11:05:38 +02:00
										 |  |  | 			'-Wformat',
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  | 			'-Wformat-security',
 | 
					
						
							|  |  |  | 			'-Werror=suggest-attribute=format',
 | 
					
						
							|  |  |  | 			'-Wmissing-braces',
 | 
					
						
							|  |  |  | 			'-Wtype-limits',
 | 
					
						
							|  |  |  | 			'-Wvariadic-macros',
 | 
					
						
							|  |  |  | 		        '-Wno-missing-field-initializers',
 | 
					
						
							|  |  |  | 		        '-Wno-unused-parameter',
 | 
					
						
							|  |  |  | 			'-Wno-pedantic',
 | 
					
						
							| 
									
										
										
										
											2020-04-30 16:07:23 +02:00
										 |  |  | 			'-Wunused-result',
 | 
					
						
							| 
									
										
										
										
											2020-04-01 12:51:42 +02:00
										 |  |  | 			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'
 | 
					
						
							|  |  |  |   neon_args = []
 | 
					
						
							|  |  |  |   have_neon = true
 | 
					
						
							|  |  |  | elif cc.has_argument('-mfpu=neon')
 | 
					
						
							|  |  |  |   neon_args = ['-mfpu=neon']
 | 
					
						
							|  |  |  |   have_neon = true
 | 
					
						
							| 
									
										
										
										
											2020-03-27 08:27:11 -04:00
										 |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | cdata = configuration_data()
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | cdata.set('PIPEWIRE_VERSION_MAJOR', pipewire_version_major)
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_VERSION_MINOR', pipewire_version_minor)
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_VERSION_MICRO', pipewire_version_micro)
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_VERSION_NANO', pipewire_version_nano)
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_API_VERSION', '"@0@"'.format(apiversion))
 | 
					
						
							| 
									
										
										
										
											2017-08-17 19:01:11 +02:00
										 |  |  | cdata.set('PIPEWIRE_DATADIR', '"@0@"'.format(pipewire_datadir))
 | 
					
						
							|  |  |  | cdata.set('LOCALEDIR', '"@0@"'.format(pipewire_localedir))
 | 
					
						
							|  |  |  | cdata.set('LIBDIR', '"@0@"'.format(pipewire_libdir))
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | cdata.set('GETTEXT_PACKAGE', '"pipewire"')
 | 
					
						
							| 
									
										
										
										
											2018-11-05 17:48:52 +01:00
										 |  |  | cdata.set('PIPEWIRE_LICENSE', '"MIT"')
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | cdata.set('PIPEWIRE_PACKAGE_ORIGIN', '"Unknown package origin"')
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_PACKAGE_NAME', '"PipeWire source release"')
 | 
					
						
							|  |  |  | cdata.set('PACKAGE', '"pipewire"')
 | 
					
						
							|  |  |  | cdata.set('PACKAGE_NAME', '"PipeWire"')
 | 
					
						
							|  |  |  | cdata.set('PACKAGE_STRING', '"PipeWire @0@"'.format(pipewire_version))
 | 
					
						
							|  |  |  | cdata.set('PACKAGE_TARNAME', '"pipewire"')
 | 
					
						
							| 
									
										
										
										
											2017-06-16 17:31:40 +02:00
										 |  |  | cdata.set('PACKAGE_URL', '"http://pipewire.org"')
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | cdata.set('PACKAGE_VERSION', '"@0@"'.format(pipewire_version))
 | 
					
						
							| 
									
										
										
										
											2018-08-17 10:18:41 +02:00
										 |  |  | cdata.set('MODULEDIR', '"@0@"'.format(modules_install_dir))
 | 
					
						
							|  |  |  | cdata.set('PIPEWIRE_CONFIG_DIR', '"@0@"'.format(pipewire_configdir))
 | 
					
						
							| 
									
										
										
										
											2017-05-23 19:15:33 +02:00
										 |  |  | cdata.set('VERSION', '"@0@"'.format(pipewire_version))
 | 
					
						
							| 
									
										
										
										
											2018-08-17 10:18:41 +02:00
										 |  |  | cdata.set('PLUGINDIR', '"@0@"'.format(spa_plugindir))
 | 
					
						
							| 
									
										
										
										
											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)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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'],
 | 
					
						
							|  |  |  |   ['sys/param.h', 'HAVE_SYS_PARAM_H'],
 | 
					
						
							|  |  |  |   ['sys/poll.h', 'HAVE_SYS_POLL_H'],
 | 
					
						
							|  |  |  |   ['sys/prctl.h', 'HAVE_SYS_PRCTL_H'],
 | 
					
						
							|  |  |  |   ['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'],
 | 
					
						
							|  |  |  |   ['sys/wait.h', 'HAVE_SYS_WAIT_H'],
 | 
					
						
							|  |  |  |   ['ucontext.h', 'HAVE_UCONTEXT_H'],
 | 
					
						
							|  |  |  |   ['unistd.h', 'HAVE_UNISTD_H'],
 | 
					
						
							|  |  |  |   ['valgrind/valgrind.h', 'HAVE_VALGRIND_VALGRIND_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
 | 
					
						
							|  |  |  | 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
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-18 09:50:43 +02:00
										 |  |  | if get_option('systemd')
 | 
					
						
							|  |  |  |   systemd = dependency('systemd', required: false)
 | 
					
						
							|  |  |  |   systemd_dep = dependency('libsystemd', required: false)
 | 
					
						
							| 
									
										
										
										
											2018-10-29 13:11:38 +00:00
										 |  |  |   if systemd.found() and systemd_dep.found()
 | 
					
						
							| 
									
										
										
										
											2018-10-18 09:50:43 +02:00
										 |  |  |     cdata.set('HAVE_SYSTEMD_DAEMON', 1)
 | 
					
						
							|  |  |  |   else
 | 
					
						
							|  |  |  |     warning('Systemd integration was enabled, but systemd is not available')
 | 
					
						
							|  |  |  |   endif
 | 
					
						
							|  |  |  | endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | configure_file(input : 'config.h.meson',
 | 
					
						
							|  |  |  |   output : 'config.h',
 | 
					
						
							|  |  |  |   configuration : cdata)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | configinc = include_directories('.')
 | 
					
						
							| 
									
										
										
										
											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()
 | 
					
						
							| 
									
										
										
										
											2020-01-08 15:41:01 +01:00
										 |  |  |   makedata.set('BUILD_ROOT', meson.build_root())
 | 
					
						
							| 
									
										
										
										
											2017-06-26 13:04:47 +02:00
										 |  |  |   makedata.set('VERSION', pipewire_version)
 | 
					
						
							|  |  |  | 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')
 | 
					
						
							| 
									
										
										
										
											2016-11-24 18:17:29 +01:00
										 |  |  | dbus_dep = dependency('dbus-1')
 | 
					
						
							| 
									
										
										
										
											2019-01-29 17:39:44 +02:00
										 |  |  | sdl_dep = dependency('sdl2', required : false)
 | 
					
						
							| 
									
										
										
										
											2020-03-05 18:29:33 -03:00
										 |  |  | sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : false)
 | 
					
						
							| 
									
										
										
										
											2017-11-13 20:08:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-29 17:39:44 +02:00
										 |  |  | if get_option('gstreamer') or get_option('pipewire-pulseaudio')
 | 
					
						
							|  |  |  |   glib_dep = dependency('glib-2.0', version : '>=2.32.0')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-06-01 11:38:18 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-19 11:44:28 +02:00
										 |  |  | if get_option('gstreamer')
 | 
					
						
							| 
									
										
										
										
											2017-11-20 11:04:02 +01:00
										 |  |  |   gobject_dep = dependency('gobject-2.0')
 | 
					
						
							|  |  |  |   gmodule_dep = dependency('gmodule-2.0')
 | 
					
						
							|  |  |  |   gio_dep = [dependency('gio-2.0'), dependency('gio-unix-2.0')]
 | 
					
						
							|  |  |  |   gst_dep = [dependency('gstreamer-1.0'),
 | 
					
						
							|  |  |  |              dependency('gstreamer-plugins-base-1.0'),
 | 
					
						
							|  |  |  |              dependency('gstreamer-video-1.0'),
 | 
					
						
							|  |  |  |              dependency('gstreamer-audio-1.0'),
 | 
					
						
							|  |  |  |              dependency('gstreamer-allocators-1.0'),]
 | 
					
						
							|  |  |  | 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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-09 23:08:05 +04:00
										 |  |  | alsa_dep = (get_option('pipewire-alsa')
 | 
					
						
							|  |  |  |     ? dependency('alsa')
 | 
					
						
							|  |  |  |     : dependency('', required: false))
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							|  |  |  | if get_option('pipewire-jack')
 | 
					
						
							| 
									
										
										
										
											2018-10-19 13:21:52 +02:00
										 |  |  |   jack_dep = dependency('jack', version : '>= 1.9.10')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  |   subdir('pipewire-jack/src')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-10-19 13:21:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | if get_option('pipewire-pulseaudio')
 | 
					
						
							| 
									
										
										
										
											2018-10-19 13:21:52 +02:00
										 |  |  |   pulseaudio_dep = dependency('libpulse', version : '>= 11.1')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  |   subdir('pipewire-pulseaudio/src')
 | 
					
						
							|  |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-10-19 13:21:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | if get_option('pipewire-alsa')
 | 
					
						
							|  |  |  |   subdir('pipewire-alsa/alsa-plugins')
 | 
					
						
							| 
									
										
										
										
											2020-05-02 10:42:44 +02:00
										 |  |  |   subdir('pipewire-alsa/conf')
 | 
					
						
							| 
									
										
										
										
											2018-10-09 13:57:59 +05:30
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2016-09-26 12:15:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-19 11:44:28 +02:00
										 |  |  | if get_option('docs')
 | 
					
						
							| 
									
										
										
										
											2018-01-24 12:01:25 +00:00
										 |  |  |   doxygen = find_program('doxygen', required : false)
 | 
					
						
							| 
									
										
										
										
											2017-11-03 12:26:55 +01:00
										 |  |  |   if doxygen.found()
 | 
					
						
							| 
									
										
										
										
											2017-10-19 00:02:08 +02:00
										 |  |  |     subdir('doc')
 | 
					
						
							| 
									
										
										
										
											2018-01-24 12:01:25 +00:00
										 |  |  |   else
 | 
					
						
							|  |  |  |     warning('Documentation was enabled, but doxygen is not available')
 | 
					
						
							| 
									
										
										
										
											2017-10-19 00:02:08 +02:00
										 |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2017-05-30 19:46:51 +02:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2017-06-16 17:31:40 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-19 11:44:28 +02:00
										 |  |  | if get_option('man')
 | 
					
						
							| 
									
										
										
										
											2018-01-24 12:01:25 +00:00
										 |  |  |   xmltoman = find_program('xmltoman', required : false)
 | 
					
						
							| 
									
										
										
										
											2017-11-03 12:26:55 +01:00
										 |  |  |   if xmltoman.found()
 | 
					
						
							| 
									
										
										
										
											2017-10-19 00:02:08 +02:00
										 |  |  |     subdir('man')
 | 
					
						
							| 
									
										
										
										
											2018-01-24 12:01:25 +00:00
										 |  |  |   else
 | 
					
						
							|  |  |  |     warning('Man page generation was enabled, but xmltoman is not available')
 | 
					
						
							| 
									
										
										
										
											2017-10-19 00:02:08 +02:00
										 |  |  |   endif
 | 
					
						
							| 
									
										
										
										
											2017-06-16 17:31:40 +02:00
										 |  |  | endif
 | 
					
						
							| 
									
										
										
										
											2018-09-23 06:25:16 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | setenv = find_program('pw-uninstalled.sh')
 | 
					
						
							| 
									
										
										
										
											2020-01-16 13:26:47 +01:00
										 |  |  | run_target('uninstalled', command : [setenv,
 | 
					
						
							|  |  |  |     '-b@0@'.format(meson.build_root()), '-v@0@'.format(pipewire_version)])
 |