Enable `io.popen` on Linux
This commit is contained in:
parent
4f05516783
commit
2cddfecfb2
13
build.rs
13
build.rs
|
@ -1,8 +1,17 @@
|
||||||
extern crate gcc;
|
extern crate gcc;
|
||||||
|
|
||||||
|
use std::env;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
gcc::Config::new()
|
let mut config = gcc::Config::new();
|
||||||
.define("LUA_USE_APICHECK", None)
|
|
||||||
|
if env::var("CARGO_CFG_TARGET_OS") == Ok("linux".to_string()) {
|
||||||
|
// Among other things, this enables `io.popen` support.
|
||||||
|
// Despite the name, we could enable this on more platforms.
|
||||||
|
config.define("LUA_USE_LINUX", None);
|
||||||
|
}
|
||||||
|
|
||||||
|
config.define("LUA_USE_APICHECK", None)
|
||||||
.include("lua")
|
.include("lua")
|
||||||
.file("lua/lapi.c")
|
.file("lua/lapi.c")
|
||||||
.file("lua/lauxlib.c")
|
.file("lua/lauxlib.c")
|
||||||
|
|
Loading…
Reference in New Issue