Add an abseil subproject and correctly specify fallback deps
This commit is contained in:
22
meson.build
22
meson.build
@ -44,20 +44,30 @@ have_win = false
|
||||
# if pkg-config is not found, instead of CMake or manual library detection.
|
||||
# This might be surprising, but is hopefully a temporary state until recent
|
||||
# abseil versions become the norm.
|
||||
absl_base_dep = dependency('absl_base', required : false)
|
||||
absl_flags_dep = dependency('absl_flags', required : false)
|
||||
absl_strings_dep = dependency('absl_strings', required : false)
|
||||
absl_synchronization_dep = dependency('absl_synchronization', required : false)
|
||||
absl_types_dep = dependency('absl_optional', required : false)
|
||||
absl_base_dep = dependency('absl_base', required : false,
|
||||
fallback: [ 'abseil-cpp', 'absl_base_dep' ]
|
||||
)
|
||||
absl_flags_dep = dependency('absl_flags_parse', required : false,
|
||||
fallback: [ 'abseil-cpp', 'absl_flags_dep' ]
|
||||
)
|
||||
absl_optional_dep = dependency('absl_optional', required : false,
|
||||
fallback: [ 'abseil-cpp', 'absl_types_dep' ]
|
||||
)
|
||||
absl_strings_dep = dependency('absl_strings', required : false,
|
||||
fallback: [ 'abseil-cpp', 'absl_strings_dep' ]
|
||||
)
|
||||
absl_synchronization_dep = dependency('absl_synchronization', required : false,
|
||||
fallback: [ 'abseil-cpp', 'absl_synchronization_dep' ]
|
||||
)
|
||||
|
||||
# If we have the base dep, assume the rest should be present to
|
||||
if absl_base_dep.found()
|
||||
absl_dep = [
|
||||
absl_base_dep,
|
||||
absl_flags_dep,
|
||||
absl_optional_dep,
|
||||
absl_strings_dep,
|
||||
absl_synchronization_dep,
|
||||
absl_types_dep,
|
||||
]
|
||||
else
|
||||
warning('Could not find abseil-cpp with pkg-config, trying CMake-based library detection.')
|
||||
|
Reference in New Issue
Block a user