forked from gentoo-utils/gentoo-utils
add meson support
This commit is contained in:
31
subprojects/thiserror/meson.build
Normal file
31
subprojects/thiserror/meson.build
Normal file
@@ -0,0 +1,31 @@
|
||||
project(
|
||||
'thiserror',
|
||||
'rust',
|
||||
version: '2.0.17',
|
||||
meson_version: '>=1.9.1',
|
||||
default_options: {
|
||||
'rust_std': '2024',
|
||||
'rust_nightly': 'enabled',
|
||||
'rust_edition': 2024,
|
||||
},
|
||||
)
|
||||
|
||||
rust = import('rust')
|
||||
|
||||
syn = dependency('syn-2-rs')
|
||||
proc_macro2 = dependency('proc-macro2-1-rs')
|
||||
quote = dependency('quote-1-rs')
|
||||
|
||||
|
||||
thiserror_proc_macro = rust.proc_macro(
|
||||
'thiserror_impl',
|
||||
'impl/src/lib.rs',
|
||||
dependencies: [syn, proc_macro2, quote],
|
||||
)
|
||||
|
||||
thiserror = static_library(
|
||||
'thiserror',
|
||||
'src/lib.rs',
|
||||
rust_args: ['--cfg', 'feature="std"'],
|
||||
link_with: [thiserror_proc_macro],
|
||||
)
|
||||
Reference in New Issue
Block a user