-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
27 lines (22 loc) · 863 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use build_target::*;
fn main() {
let mut build = cxx_build::bridge("src/ced.rs");
build
.file("3rdparty/compact_enc_det/compact_enc_det/compact_enc_det.cc")
.file("3rdparty/compact_enc_det/compact_enc_det/compact_enc_det_hint_code.cc")
.file("3rdparty/compact_enc_det/util/encodings/encodings.cc")
.file("3rdparty/compact_enc_det/util/languages/languages.cc")
.include("3rdparty/compact_enc_det")
.std("c++14")
.flag_if_supported("-Wno-narrowing")
.flag_if_supported("-Wno-c++11-narrowing");
if target_os().unwrap() == Os::Windows {
build
.define("UNICODE", None)
.define("_UNICODE", None)
.define("STRICT", None)
.define("NOMINMAX", None);
}
build.compile("ced");
println!("cargo:rerun-if-changed=src/ced.rs");
}