2024-08-20 23:52:46 +00:00
|
|
|
# FIXME: remove hack once we get rid of meson 1.4
|
|
|
|
rnix_name = 'rnix-0.11-rs'
|
|
|
|
rowan_name = 'rowan-0.15-rs'
|
|
|
|
if meson.version().version_compare('< 1.5')
|
|
|
|
rnix_name = 'rnix-rs'
|
|
|
|
rowan_name = 'rowan-rs'
|
|
|
|
endif
|
2024-08-10 16:59:58 +00:00
|
|
|
|
2024-08-20 23:52:46 +00:00
|
|
|
rnix = dependency(rnix_name)
|
|
|
|
rowan = dependency(rowan_name)
|
2024-08-10 16:59:58 +00:00
|
|
|
|
|
|
|
lix_doc = static_library(
|
|
|
|
'lix_doc',
|
|
|
|
sources : files('src/lib.rs'),
|
|
|
|
rust_abi : 'c',
|
|
|
|
dependencies : [
|
|
|
|
rowan,
|
|
|
|
rnix,
|
|
|
|
],
|
|
|
|
# If an installed static library depends on this target, then Meson will force
|
|
|
|
# that to link with `-Wl,--whole-archive`, unless we also install this target.
|
|
|
|
# `-Wl,--whole-archive` can cause some Problems when linking multiple nested
|
|
|
|
# static libraries, so let's just install the damn thing.
|
|
|
|
install : true,
|
|
|
|
)
|
|
|
|
|
|
|
|
liblix_doc = declare_dependency(
|
|
|
|
link_with : lix_doc,
|
|
|
|
)
|