Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-built bindings for GDAL 3.7 #401

Merged
merged 4 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changes

## Unreleased
- Added pre-built bindings for GDAL 3.7

- <https://github.com/georust/gdal/pull/401>

- Added `SpatialRef::to_projjson`

- <https://github.com/georust/gdal/pull/389>
Expand Down
6 changes: 5 additions & 1 deletion gdal-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ use std::path::{Path, PathBuf};

#[cfg(feature = "bindgen")]
pub fn write_bindings(include_paths: Vec<String>, out_path: &Path) {
// To generate the bindings manually, use
// bindgen --constified-enum-module ".*" --ctypes-prefix libc --allowlist-function "(CPL|CSL|GDAL|OGR|OSR|OCT|VSI).*" wrapper.h -- $(pkg-config --cflags-only-I gdal) -fretain-comments-from-system-headers
// If you add a new pre-built version, make sure to bump the docs.rs version in main.

Comment on lines +11 to +14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

let mut builder = bindgen::Builder::default()
.size_t_is_usize(true)
.header("wrapper.h")
Expand Down Expand Up @@ -65,7 +69,7 @@ fn main() {
// Hardcode a prebuilt binding version while generating docs.
// Otherwise docs.rs will explode due to not actually having libgdal installed.
if std::env::var("DOCS_RS").is_ok() {
let version = Version::parse("3.5.0").expect("invalid version for docs.rs");
let version = Version::parse("3.7.0").expect("invalid version for docs.rs");
println!(
"cargo:rustc-cfg=gdal_sys_{}_{}_{}",
version.major, version.minor, version.patch
Expand Down
Loading