fix build on linux

master
Niko PLP 1 year ago
parent d48b1d1ab9
commit 3da534823f
  1. 9
      librocksdb-sys/build.rs

@ -150,10 +150,15 @@ fn build_rocksdb() {
config.include("rocksdb/plugin/ippcp/library/include"); config.include("rocksdb/plugin/ippcp/library/include");
lib_sources.push("plugin/ippcp/ippcp_provider.cc"); lib_sources.push("plugin/ippcp/ippcp_provider.cc");
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let prebuild_lib = if target.contains("darwin") {
"macos"
} else {
"linux"
};
println!( println!(
"cargo:rustc-link-search=native={}", "cargo:rustc-link-search=native={}",
Path::new(&dir) Path::new(&dir)
.join("rocksdb/plugin/ippcp/library/macos/lib") .join(format!("rocksdb/plugin/ippcp/library/{prebuild_lib}/lib"))
.display() .display()
); );
println!("cargo:rustc-link-lib=static=ippcp"); println!("cargo:rustc-link-lib=static=ippcp");
@ -172,7 +177,7 @@ fn build_rocksdb() {
// .display() // .display()
// ); // );
// println!("cargo:rustc-link-lib=static=crypto"); // println!("cargo:rustc-link-lib=static=crypto");
} }
if target.contains("apple-ios") { if target.contains("apple-ios") {
config.define("OS_MACOSX", None); config.define("OS_MACOSX", None);

Loading…
Cancel
Save