From 3da534823f8b7d5d9bc610372f8fc01812b0cb1b Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Thu, 17 Aug 2023 00:04:08 +0300 Subject: [PATCH] fix build on linux --- librocksdb-sys/build.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 40ebda2..584388e 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -150,10 +150,15 @@ fn build_rocksdb() { config.include("rocksdb/plugin/ippcp/library/include"); lib_sources.push("plugin/ippcp/ippcp_provider.cc"); let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); + let prebuild_lib = if target.contains("darwin") { + "macos" + } else { + "linux" + }; println!( "cargo:rustc-link-search=native={}", Path::new(&dir) - .join("rocksdb/plugin/ippcp/library/macos/lib") + .join(format!("rocksdb/plugin/ippcp/library/{prebuild_lib}/lib")) .display() ); println!("cargo:rustc-link-lib=static=ippcp"); @@ -172,7 +177,7 @@ fn build_rocksdb() { // .display() // ); // println!("cargo:rustc-link-lib=static=crypto"); - } + } if target.contains("apple-ios") { config.define("OS_MACOSX", None);