|
1 | 1 | [](https://travis-ci.org/georust/proj-sys)
|
2 | 2 |
|
3 | 3 | # Low-level bindings for PROJ v7.1.x
|
4 |
| -**This is a [`*-sys`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#a-sys-packages) crate; you shouldn't use its API directly.** The [`proj`](https://github.com/georust/proj) crate is designed for general use. |
5 | 4 |
|
6 |
| -A guide to the functions can be found here: https://proj.org/development/reference/functions.html. Run `cargo doc (optionally --open)` to generate the crate documentation. |
| 5 | +**This is a |
| 6 | +[`*-sys`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#a-sys-packages) |
| 7 | +crate; you shouldn't use its API directly.** The |
| 8 | +[`proj`](https://github.com/georust/proj) crate is designed for general use. |
7 | 9 |
|
8 |
| -## Requirements |
| 10 | +A guide to the functions can be found here: |
| 11 | +https://proj.org/development/reference/functions.html. Run `cargo doc |
| 12 | +(optionally --open)` to generate the crate documentation. |
9 | 13 |
|
10 |
| -By default, `libproj` (via `PROJ v7.1.x`) must be present on your system. While this crate may be backwards-compatible with older PROJ 7 and PROJ 6 versions, this is neither tested or supported. |
11 | 14 |
|
12 |
| -## Optional Features |
13 |
| -Enable these in your `Cargo.toml` like so: |
| 15 | +By default, the crate will search for an existing `libproj` (via `PROJ v7.1.x`) |
| 16 | +installation on your system using |
| 17 | +[pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/). |
14 | 18 |
|
15 |
| -`proj-sys = { version = "0.18.1", features = ["bundled_proj"] }` |
16 |
| -`proj-sys = { version = "0.18.1", features = ["pkg_config"] }` |
| 19 | +If an acceptable installation is not found, proj-sys will attempt to build |
| 20 | +libproj from source bundled in the crate. |
17 | 21 |
|
18 |
| -Note that these features are **mutually exclusive**. |
| 22 | +## Features |
19 | 23 |
|
20 |
| -1. `bundled_proj` (Linux and macOS targets): |
21 |
| - - allow the crate to internally build and depend on a bundled `libproj`. Note that SQLite3 and `libtiff` must be present on your system if you wish to use this feature, and that it builds `libproj` **without** its native network functionality; you will have to implement your own set of callbacks if you wish to make use of them (see the [`proj`](https://crates.io/crates/proj) crate for an example). |
22 |
| -2. `pkg_config` (Linux and macOS targets) |
23 |
| - - uses [`pkg-config`](https://en.wikipedia.org/wiki/Pkg-config) to add search paths to the build script. Requires `pkg-config` to be installed (available on Homebrew, Macports, apt etc.) |
| 24 | +`bundled_proj` - forces building libproj from source even if an acceptable |
| 25 | +version could be found on your system. Note that SQLite3 and `libtiff` must be |
| 26 | +present on your system if you wish to use this feature, and that it builds |
| 27 | +`libproj` **without** its native network functionality; you will have to |
| 28 | +implement your own set of callbacks if you wish to make use of them (see the |
| 29 | +[`proj`](https://crates.io/crates/proj) crate for an example). |
24 | 30 |
|
25 | 31 | ## License
|
26 | 32 |
|
|
0 commit comments