meson: Add indexmap rust dependencies

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: @LingMan
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
This commit is contained in:
Christian Gmeiner
2024-06-24 13:30:36 +02:00
committed by Marge Bot
parent 02bc51f477
commit 9e3e12e6a9
7 changed files with 87 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
project(
'equivalent',
'rust',
version : '1.0.1',
license :'MIT OR Apache-2.0',
)
lib = static_library(
'equivalent',
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
)
dep_equivalent = declare_dependency(
link_with : [lib],
)

View File

@@ -0,0 +1,23 @@
project(
'hashbrown',
'rust',
version : '0.14.1',
license :'MIT OR Apache-2.0',
)
rust_args = [
'--cfg', 'feature="raw"'
]
lib = static_library(
'hashbrown',
'src/lib.rs',
rust_args : rust_args,
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
)
dep_hashbrown = declare_dependency(
link_with : [lib],
)

View File

@@ -0,0 +1,27 @@
project(
'indexmap',
'rust',
version : '2.2.6',
license :'MIT OR Apache-2.0',
)
dep_equivalent = subproject('equivalent').get_variable('dep_equivalent')
dep_hashbrown = subproject('hashbrown').get_variable('dep_hashbrown')
rust_args = [
'--cfg', 'feature="std"'
]
lib = static_library(
'indexmap',
'src/lib.rs',
rust_args : rust_args,
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
dependencies : [dep_equivalent, dep_hashbrown]
)
dep_indexmap = declare_dependency(
link_with : [lib],
)