Add an abseil subproject and correctly specify fallback deps
This commit is contained in:
parent
0cc2ebeda2
commit
5a5aa66ada
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
build/
|
||||
depcomp
|
||||
install/
|
||||
subprojects/*/
|
||||
|
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.')
|
||||
|
23
subprojects/abseil-cpp.wrap
Normal file
23
subprojects/abseil-cpp.wrap
Normal file
@ -0,0 +1,23 @@
|
||||
[wrap-file]
|
||||
directory = abseil-cpp-20210324.2
|
||||
source_url = https://github.com/abseil/abseil-cpp/archive/20210324.2.tar.gz
|
||||
source_filename = abseil-cpp-20210324.2.tar.gz
|
||||
source_hash = 59b862f50e710277f8ede96f083a5bb8d7c9595376146838b9580be90374ee1f
|
||||
patch_filename = abseil-cpp_20210324.2-3_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20210324.2-3/get_patch
|
||||
patch_hash = 87827a6ed1fcee2c5f36d57ccdadefd536bac544892d7196b578ffb671a25c0a
|
||||
|
||||
[provide]
|
||||
absl_base = absl_base_dep
|
||||
absl_container = absl_container_dep
|
||||
absl_debugging = absl_debugging_dep
|
||||
absl_flags = absl_flags_dep
|
||||
absl_hash = absl_hash_dep
|
||||
absl_numeric = absl_numeric_dep
|
||||
absl_random = absl_random_dep
|
||||
absl_status = absl_status_dep
|
||||
absl_strings = absl_strings_dep
|
||||
absl_synchronization = absl_synchronization_dep
|
||||
absl_time = absl_time_dep
|
||||
absl_types = absl_types_dep
|
||||
|
Loading…
x
Reference in New Issue
Block a user