I'm developing a cross-platform graphics library which can use several rendering backends, one of which requires freetype (which I'm including as a system library). This is posing a bit of a problem, since iOS/iPadOS/tvOS/watchOS don't have a system package manager and can't use that backend. SwiftPM doesn't seem to have any way to conditionally include that system-library target, nor the C targets which depend on it, based on the target OS. Similarly, I have a CoreGraphics backend, and rather than listing out every single Apple device (which gets very annoying, very quickly), I'd rather model that as an optional system-library target and conditionally add targets which depend on it based on its availability.
Ultimately, those conditional targets could then give rise to conditional products.
Is there any kind of outline or sketch about how these could be modelled in SwiftPM? Is there anything I or the rest of the community could do to help push it forward?
P.S. I know you can compile freetype for those platforms, but some quick googling suggests that it might not be trivial and I really can't be bothered with it. Maybe one day, but not now. Besides, it wouldn't solve the CoreGraphics problem.