Browse Source

fix: build error on `docs.rs`

master
Dnomd343 4 days ago
parent
commit
a736108791
  1. 4
      src/core_ffi/rust_ffi/build.rs

4
src/core_ffi/rust_ffi/build.rs

@ -7,7 +7,10 @@
use cxx_build::CFG; use cxx_build::CFG;
// TODO: assert version info
fn main() { fn main() {
if std::env::var("DOCS_RS").is_err() {
cmake::Config::new("klotski") cmake::Config::new("klotski")
.define("CARGO_BUILD:BOOL", "ON") .define("CARGO_BUILD:BOOL", "ON")
.define("KLSK_ENABLE_TESTING:BOOL", "OFF") .define("KLSK_ENABLE_TESTING:BOOL", "OFF")
@ -26,6 +29,7 @@ fn main() {
.flag("-fno-rtti") .flag("-fno-rtti")
.flag("-fno-exceptions") .flag("-fno-exceptions")
.compile("klotski"); .compile("klotski");
}
println!("cargo:rerun-if-changed=src/bridge.rs"); println!("cargo:rerun-if-changed=src/bridge.rs");
println!("cargo:rerun-if-changed=adapter/short_code.cc"); println!("cargo:rerun-if-changed=adapter/short_code.cc");

Loading…
Cancel
Save