Skip to content

Commit 03f1f11

Browse files
committed
fix: proper lib search
1 parent 8f8750b commit 03f1f11

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

libsql-ffi/build.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,16 @@ pub fn build_bundled(out_dir: &str, out_path: &Path) {
412412
fn copy_multiple_ciphers(out_path: &Path) {
413413
let dst = dbg!(build_multiple_ciphers(out_path));
414414

415-
println!("cargo:rustc-link-lib=static=sqlite3mc_static");
416415
println!("cargo:rustc-link-search={}", dst.join("build").display());
416+
println!(
417+
"cargo:rustc-link-search={}",
418+
dst.join("build").join("Release").display()
419+
);
420+
println!(
421+
"cargo:rustc-link-search={}",
422+
dst.join("build").join("Debug").display()
423+
);
424+
println!("cargo:rustc-link-lib=static=sqlite3mc_static");
417425
}
418426

419427
fn build_multiple_ciphers(out_path: &Path) -> PathBuf {
@@ -450,7 +458,7 @@ fn build_multiple_ciphers(out_path: &Path) -> PathBuf {
450458
let mut config = cmake::Config::new(&bundled_dir);
451459

452460
config
453-
.define("CMAKE_BUILD_TYPE", "Release")
461+
.build_target("sqlite3mc_static")
454462
.define("SQLITE3MC_STATIC", "ON")
455463
.define("CODEC_TYPE", "AES256")
456464
.define("SQLITE3MC_BUILD_SHELL", "OFF")

0 commit comments

Comments
 (0)