Expand description
A build dependency for running the correct autotools commands to build a native library
This crate provides the facilities to setup the build system and build native libraries
that leverage autotools
or configure & make
workalike scripts.
Installation
Add to your Cargo.toml
a build dependency:
[build-dependencies]
autotools = "0.2"
Usage
use autotools;
// Build the project in the path `foo` and installs it in `$OUT_DIR`
let dst = autotools::build("foo");
// Simply link the library without using pkg-config
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=static=foo");
use autotools::Config;
let dst = Config::new("foo")
.reconf("-ivf")
.enable("feature", None)
.with("dep", None)
.disable("otherfeature", None)
.without("otherdep", None)
.cflag("-Wall")
.build();
Structs
Builder style configuration for a pending autotools build.
Functions
Builds the native library rooted at path
with the default configure options.
This will return the directory in which the library was installed.