diff options
author | Arun Raghavan <arun@asymptotic.io> | 2021-06-05 17:59:12 -0400 |
---|---|---|
committer | Arun Raghavan <arun@asymptotic.io> | 2021-06-05 18:37:23 -0400 |
commit | e74894baebe0bba7a7fe37ae0a46a2e9b1b2e021 (patch) | |
tree | b53afa9d699a924e4c97939ccc0cea95b1b1d91a | |
parent | 589a744585ca047a2b59127ab50f747cd7c56e32 (diff) | |
download | webrtc-audio-processing-e74894baebe0bba7a7fe37ae0a46a2e9b1b2e021.tar.gz |
build: Add library-based absl detection as a fallback
This should help for cases where users can make abseil-cpp available but
wiring up the CMake-build isn't that easy (for example, while
cross-compiling).
-rw-r--r-- | meson.build | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 606d40b..b4cce45 100644 --- a/meson.build +++ b/meson.build @@ -46,9 +46,47 @@ absl_dep = dependency('absl', method : 'cmake', 'absl::flags_parse', 'absl::strings', 'absl::synchronization', - ] + ], + required : false, ) +if not absl_dep.found() + warning('Could not find abseil-cpp with CMake, using fallback library detection which may fail.') + absl_libs = [ + 'absl_base', + 'absl_bad_optional_access', + 'absl_city', + 'absl_flags_commandlineflag', + 'absl_flags_commandlineflag_internal', + 'absl_flags_config', + 'absl_flags_internal', + 'absl_flags_marshalling', + 'absl_flags_parse', + 'absl_flags_private_handle_accessor', + 'absl_flags_program_name', + 'absl_flags_reflection', + 'absl_flags_usage', + 'absl_flags_usage_internal', + 'absl_hash', + 'absl_int128', + 'absl_malloc_internal', + 'absl_raw_logging_internal', + 'absl_spinlock_wait', + 'absl_stacktrace', + 'absl_str_format_internal', + 'absl_strings', + 'absl_symbolize', + 'absl_synchronization', + 'absl_throw_delegate', + 'absl_time', + 'absl_time_zone', + ] + absl_dep = [] + foreach l : absl_libs + absl_dep += cpp.find_library(l, required : false) + endforeach +endif + if ['darwin', 'ios'].contains(host_system) os_cflags = ['-DWEBRTC_MAC'] if host_system == 'ios' |