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 build.rs to gdal-sys #33

Merged
merged 3 commits into from
Feb 26, 2017
Merged

Add build.rs to gdal-sys #33

merged 3 commits into from
Feb 26, 2017

Conversation

jdroenner
Copy link
Member

I added a build.rs to gdal-sys to enable building on windows. Building on windows requires $GDAL_HOME to point to the base of the GDAL installation. The gnu toolchain works if gdal_i.lib is found in $GDAL_HOME\lib or if a gdal{version}.dll is found in $GDAL_HOME\bin. Msvc works only when the lib is available.

Additionally i moved the last FFI call to gdal-sys and silenced some warnings..

Moved the last FFI call to gdal-sys.
Silenced some warnings.
let link_type = "dylib";
let lib_name = "gdal";

#[cfg(target_family="windows")]
Copy link
Member

Choose a reason for hiding this comment

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

https://doc.rust-lang.org/reference.html#conditional-compilation

You should be able to make this just #[cfg(windows)]

}
}

#[cfg(target_family="unix")]
Copy link
Member

Choose a reason for hiding this comment

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

#[cfg(unix)]

Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

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

LGTM, my comments are minor, so feel free to ignore them

@jdroenner jdroenner merged commit db1172e into georust:master Feb 26, 2017
@jdroenner jdroenner deleted the build.rs branch February 26, 2017 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants