aboutsummaryrefslogtreecommitdiff
path: root/subprojects/packagefiles/glib-sys-0.21-rs/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/packagefiles/glib-sys-0.21-rs/meson.build')
-rw-r--r--subprojects/packagefiles/glib-sys-0.21-rs/meson.build33
1 files changed, 33 insertions, 0 deletions
diff --git a/subprojects/packagefiles/glib-sys-0.21-rs/meson.build b/subprojects/packagefiles/glib-sys-0.21-rs/meson.build
new file mode 100644
index 0000000..8c54833
--- /dev/null
+++ b/subprojects/packagefiles/glib-sys-0.21-rs/meson.build
@@ -0,0 +1,33 @@
+project('glib-sys-0.21-rs', 'rust',
+ meson_version: '>=1.5.0',
+ version: '0.21.2',
+ license: 'MIT',
+ default_options: [])
+
+subproject('libc-0.2-rs', required: true)
+libc_rs = dependency('libc-0.2-rs')
+
+_glib_sys_rs = static_library(
+ 'glib_sys',
+ files('src/lib.rs'),
+ gnu_symbol_visibility: 'hidden',
+ override_options: ['rust_std=2021', 'build.rust_std=2021'],
+ rust_abi: 'rust',
+ rust_args: [
+ '--cap-lints', 'allow',
+ '--cfg', 'feature="v2_66"',
+ '--cfg', 'feature="v2_64"',
+ '--cfg', 'feature="v2_62"',
+ '--cfg', 'feature="v2_60"',
+ '--cfg', 'feature="v2_58"',
+ ],
+ # should also link with glib; don't bother doing it here since all
+ # QEMU targets have it
+ dependencies: [libc_rs],
+)
+
+glib_sys_dep = declare_dependency(
+ link_with: _glib_sys_rs,
+)
+
+meson.override_dependency('glib-sys-0.21-rs', glib_sys_dep)