diff options
author | Arun Raghavan <arun@asymptotic.io> | 2020-10-12 18:08:02 -0400 |
---|---|---|
committer | Arun Raghavan <arun@asymptotic.io> | 2020-10-23 13:30:23 -0400 |
commit | bcec8b0b211ef3e7d5ca865f618b198029d67715 (patch) | |
tree | 78bf6de3df102f5e1a2d68586c580700e6e36f5f /meson.build | |
parent | b1b02581d3120733f3de7975654a930bbd8c5210 (diff) | |
download | webrtc-audio-processing-bcec8b0b211ef3e7d5ca865f618b198029d67715.tar.gz |
Update to current webrtc library
This is from the upstream library commit id
3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium
88.0.4290.1.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 62 |
1 files changed, 46 insertions, 16 deletions
diff --git a/meson.build b/meson.build index 076f8f3..a15f2c6 100644 --- a/meson.build +++ b/meson.build @@ -1,12 +1,17 @@ project('webrtc-audio-processing', 'c', 'cpp', - version : '0.3.1', + version : '0.4.0', meson_version : '>= 0.52', default_options : [ 'warning_level=1', - 'buildtype=debugoptimized' ]) + 'buildtype=debugoptimized', + 'c_std=c11', + 'cpp_std=c++14', + ] +) soversion = 0 cc = meson.get_compiler('c') +cpp = meson.get_compiler('cpp') host_system = host_machine.system() @@ -16,14 +21,28 @@ os_deps = [] have_posix = false have_win = false +absl_dep = [ + cpp.find_library('absl_base'), + cpp.find_library('absl_bad_optional_access'), + cpp.find_library('absl_flags_internal'), + cpp.find_library('absl_flags_marshalling'), + cpp.find_library('absl_flags_parse'), + cpp.find_library('absl_flags_registry'), + cpp.find_library('absl_flags_usage_internal'), + cpp.find_library('absl_raw_logging_internal'), + cpp.find_library('absl_strings'), + cpp.find_library('absl_synchronization'), + cpp.find_library('absl_throw_delegate'), +] + if ['darwin', 'ios'].contains(host_system) - os_cflags = ['-DWEBRTC_MAC', '-DWEBRTC_THREAD_RR', '-DWEBRTC_CLOCK_TYPE_REALTIME'] + os_cflags = ['-DWEBRTC_MAC'] if host_system == 'ios' os_cflags += ['-DWEBRTC_IOS'] endif have_posix = true elif host_system == 'android' - os_cflags += ['-DWEBRTC_ANDROID', '-DWEBRTC_LINUX', '-DWEBRTC_THREAD_RR', '-DWEBRTC_CLOCK_TYPE_REALTIME'] + os_cflags += ['-DWEBRTC_ANDROID', '-DWEBRTC_LINUX'] os_deps += [cc.find_library('log')] os_deps += [dependency('gnustl', required : get_option('gnustl'))] have_posix = true @@ -46,7 +65,10 @@ arch_cflags = [] have_arm = false have_armv7 = false have_neon = false +have_mips = false +have_mips64 = false have_x86 = false +have_avx2 = false if ['arm', 'armv7'].contains(host_machine.cpu_family()) if cc.compiles('''#ifdef __ARM_ARCH_ISA_ARM #error no arm arch @@ -67,8 +89,19 @@ if cc.compiles('''#ifndef __aarch64__ have_neon = true arch_cflags += ['-DWEBRTC_ARCH_ARM64', '-DWEBRTC_HAS_NEON'] endif +if ['mips', 'mips64'].contains(host_machine.cpu_family()) + have_mips = true + arch_cflags += ['WEBRTC_ARCH_MIPS_FAMILY'] +endif +if host_machine.cpu_family() == 'mips64' + have_mips64 = true +endif if ['x86', 'x86_64'].contains(host_machine.cpu_family()) have_x86 = true + # This is unconditionally enabled for now, actual usage is determined by + # runtime CPU detection, so we're just assuming the compiler supports avx2 + have_avx2 = true + arch_cflags += ['-DWEBRTC_ENABLE_AVX2'] endif neon_opt = get_option('neon') @@ -84,16 +117,13 @@ if neon_opt != 'no' endif endif -noise_cflags = [] -if get_option('ns_mode') == 'float' - noise_cflags += ['-DWEBRTC_NS_FLOAT=1'] -else - noise_cflags += ['-DWEBRTC_NS_FIXED=1'] -endif - -common_cflags = ['-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD', '-DNDEBUG'] + platform_cflags + os_cflags + arch_cflags + noise_cflags -common_cxxflags = ['-std=c++11'] + common_cflags -common_deps = os_deps +common_cflags = [ + '-DWEBRTC_LIBRARY_IMPL', + '-DWEBRTC_ENABLE_SYMBOL_EXPORT', + '-DNDEBUG' + ] + platform_cflags + os_cflags + arch_cflags +common_cxxflags = common_cflags +common_deps = os_deps + [absl_dep] webrtc_inc = include_directories('.') subdir('webrtc') @@ -107,7 +137,7 @@ pkgconfig.generate( filebase: 'webrtc-audio-processing', subdirs: 'webrtc_audio_processing', extra_cflags: [ - '-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD', + '-DWEBRTC_LIBRARY_IMPL', ] + platform_cflags, libraries: libwebrtc_audio_processing, ) @@ -119,7 +149,7 @@ pkgconfig.generate( filebase: 'webrtc-audio-coding', subdirs: 'webrtc_audio_processing', extra_cflags: [ - '-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD', + '-DWEBRTC_LIBRARY_IMPL', ] + platform_cflags, libraries: libwebrtc_audio_coding, ) |