2019-09-05 10:11:26 -04:00
|
|
|
project('wireplumber', ['c', 'cpp'],
|
2020-06-29 19:36:49 +03:00
|
|
|
version : '0.3.0',
|
2019-05-31 12:13:01 +03:00
|
|
|
license : 'MIT',
|
2020-01-22 17:06:01 +02:00
|
|
|
meson_version : '>= 0.51.0',
|
2019-04-03 18:31:05 +03:00
|
|
|
default_options : [
|
|
|
|
|
'warning_level=1',
|
2019-09-05 10:11:26 -04:00
|
|
|
'buildtype=debugoptimized',
|
|
|
|
|
'cpp_std=c++11',
|
2019-04-03 18:31:05 +03:00
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
2020-06-02 18:37:13 +03:00
|
|
|
wireplumber_api_version = '0.3'
|
2019-05-29 12:47:26 +03:00
|
|
|
wireplumber_so_version = '0'
|
|
|
|
|
|
2020-06-02 18:26:40 +03:00
|
|
|
wireplumber_headers_dir = join_paths(get_option('includedir'), 'wireplumber-' + wireplumber_api_version, 'wp')
|
|
|
|
|
|
2019-05-29 17:36:22 +03:00
|
|
|
if get_option('libdir').startswith('/')
|
|
|
|
|
wireplumber_module_dir = join_paths(get_option('libdir'), 'wireplumber-' + wireplumber_api_version)
|
|
|
|
|
else
|
|
|
|
|
wireplumber_module_dir = join_paths(get_option('prefix'), get_option('libdir'), 'wireplumber-' + wireplumber_api_version)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if get_option('sysconfdir').startswith('/')
|
|
|
|
|
wireplumber_config_dir = join_paths(get_option('sysconfdir'), 'wireplumber')
|
|
|
|
|
else
|
|
|
|
|
wireplumber_config_dir = join_paths(get_option('prefix'), get_option('sysconfdir'), 'wireplumber')
|
|
|
|
|
endif
|
2019-04-10 12:32:51 +03:00
|
|
|
|
2020-07-19 10:25:29 +02:00
|
|
|
if get_option('wrap_mode') == 'nodownload'
|
|
|
|
|
cpptoml_dep = dependency('cpptoml')
|
|
|
|
|
else
|
|
|
|
|
cmake = import('cmake')
|
|
|
|
|
cpptoml = cmake.subproject('cpptoml')
|
|
|
|
|
cpptoml_dep = cpptoml.dependency('cpptoml')
|
|
|
|
|
endif
|
2019-09-05 10:11:26 -04:00
|
|
|
|
2020-06-16 19:20:13 +03:00
|
|
|
gobject_dep = dependency('gobject-2.0', version : '>= 2.58')
|
2020-06-15 09:20:38 +02:00
|
|
|
gmodule_dep = dependency('gmodule-2.0', version : '== ' + gobject_dep.version())
|
|
|
|
|
gio_dep = dependency('gio-2.0', version : '== ' + gobject_dep.version())
|
|
|
|
|
giounix_dep = dependency('gio-unix-2.0', version : '== ' + gobject_dep.version())
|
2019-04-03 18:31:05 +03:00
|
|
|
pipewire_dep = dependency('libpipewire-0.3')
|
|
|
|
|
|
2019-04-10 12:32:51 +03:00
|
|
|
gnome = import('gnome')
|
2019-12-12 20:19:19 +02:00
|
|
|
pkgconfig = import('pkgconfig')
|
2020-01-22 17:06:01 +02:00
|
|
|
gir = find_program('g-ir-scanner', required : get_option('introspection'))
|
|
|
|
|
build_gir = gir.found()
|
2019-04-10 12:32:51 +03:00
|
|
|
|
2019-04-16 15:42:10 +03:00
|
|
|
wp_lib_include_dir = include_directories('lib')
|
|
|
|
|
|
2020-12-20 22:12:11 +02:00
|
|
|
common_flags = [
|
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
|
'-Wsuggest-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',
|
|
|
|
|
]
|
2020-01-16 18:50:07 +02:00
|
|
|
cc = meson.get_compiler('c')
|
2020-12-20 22:12:11 +02:00
|
|
|
add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c')
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
ccpp = meson.get_compiler('cpp')
|
2020-12-20 22:12:11 +02:00
|
|
|
add_project_arguments(ccpp.get_supported_arguments(common_flags), language: 'cpp')
|
2020-01-16 18:50:07 +02:00
|
|
|
|
2020-02-28 13:18:28 +02:00
|
|
|
have_audiofade = cc.compiles('''
|
|
|
|
|
#include <spa/utils/names.h>
|
|
|
|
|
#ifndef SPA_NAME_CONTROL_AUDIO_FADE_SOURCE
|
|
|
|
|
#error "not using the audio fade branch"
|
|
|
|
|
#endif
|
|
|
|
|
int main(void){return 0;}
|
|
|
|
|
''',
|
|
|
|
|
name: 'audiofade',
|
|
|
|
|
dependencies: pipewire_dep)
|
|
|
|
|
if have_audiofade
|
|
|
|
|
add_project_arguments('-DHAVE_AUDIOFADE', language: 'c')
|
|
|
|
|
endif
|
|
|
|
|
|
2019-04-10 12:32:51 +03:00
|
|
|
subdir('lib')
|
2020-01-22 17:06:01 +02:00
|
|
|
subdir('docs')
|
2019-08-29 21:21:33 +03:00
|
|
|
subdir('modules')
|
2019-04-03 18:31:05 +03:00
|
|
|
subdir('src')
|
2019-08-24 16:18:15 +03:00
|
|
|
subdir('tests')
|
2019-12-05 13:29:28 +02:00
|
|
|
subdir('tools')
|