geo
geo copied to clipboard
Enabling new proj features
As of 0.16.2, proj
, has two optional, mutually-exclusive features:
-
pkg_config
, which runspkg-config
during the build phase in order to give the linker a better chance of findinglibproj
; -
bundled_proj
, which buildslibproj
from a bundled source.
Both features are available for Linux and macOS targets. The simplest approach to including them is to add two new geo
features which cover these, while retaining the "plain" use-proj
feature. However, this feels like needless duplication, even though there's no way of passing on feature flags that I'm aware of.
Do you mean something other than passing --features "proj proj/bundled_proj"
/ --features "proj proj/pkg_config"
?
Yes, because you can't specify those features in Cargo when specifying geo
as a dependency and enabling proj
(unless I'm misunderstanding you)
oh you're right. I never realized you couldn't do something like:
[dependencies]
geo = { version = "*", features = ["proj", "proj/bundled_proj"] } # <-- doesn't work
From what I can tell, you're right, if we want to allow users the option to choose, we'd need to surface a feature for each set of flags, something like:
[features]
proj_bundled = ["proj", "proj/bundled_proj"]
proj_pkg_config = ["proj", "proj/pkg_config"]
Good to close this? I feel like if people need specific features from proj we can discuss on a case-by-case basis