Fix Android cross-compile build: `cargo build --target armv7-linux-androideabi`

without.crypto
Joseph Ross 7 years ago committed by Dan Burkert
parent c240c9243b
commit ef250445c1
  1. 7
      lmdb-sys/build.rs

@ -11,7 +11,12 @@ fn main() {
lmdb.push("liblmdb");
if !pkg_config::find_library("liblmdb").is_ok() {
cc::Build::new()
let target = env::var("TARGET").expect("No TARGET found");
let mut build = cc::Build::new();
if target.contains("android") {
build.define("ANDROID", "1");
}
build
.file(lmdb.join("mdb.c"))
.file(lmdb.join("midl.c"))
// https://github.com/LMDB/lmdb/blob/LMDB_0.9.21/libraries/liblmdb/Makefile#L25

Loading…
Cancel
Save