Closed svenfoo closed 3 years ago
This is currently not supported, no.
I'm open to adding specific API for this but I don't have any experience on any other platform than Linux so may need some help to design it.
I know about #[cfg(target_os = "linux")]
for conditionally build blocks but I don't think that would do here. Is there any API we could use to fetch the platform info at runtime?
We could use std::env::consts::OS.
@svenfoo would something like this fit your use case?
[package.metadata.system-deps]
testdata = { version = "1", os = "linux" }
testlib = { version = "1", os = "macos" }
testmore = { version = "1", os = ["linux", "macos"] }
Or do you also need a way to enable a dep if the OS is not a specific one?
I implemented the syntax above in #34 , can you please give it a try and check if that fits your needs?
Sorry for ignoring you. The syntax looks useful, but I think it would help to also have the negation.
I will give the change a try on the weekend and get back to you.
Negation is now implemented, see https://github.com/gdesmott/system-deps/pull/34#issuecomment-800162607
At
librsvg
we have a dependency onpangoft2
andfontconfig
, but not if you are building for Windows. I'd like to be able to express such a target-specific dependency usingsystem_deps
. Is that already possible, is such a feature planned?