Skip to content

Commit c03714f

Browse files
committed
fix: proper lib search
1 parent d61eb49 commit c03714f

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
@@ -429,8 +429,16 @@ fn copy_multiple_ciphers(out_path: &Path) {
429429
}
430430
}
431431

432-
println!("cargo:rustc-link-lib=static=sqlite3mc_static");
433432
println!("cargo:rustc-link-search={}", dst.join("build").display());
433+
println!(
434+
"cargo:rustc-link-search={}",
435+
dst.join("build").join("Release").display()
436+
);
437+
println!(
438+
"cargo:rustc-link-search={}",
439+
dst.join("build").join("Debug").display()
440+
);
441+
println!("cargo:rustc-link-lib=static=sqlite3mc_static");
434442
}
435443

436444
fn build_multiple_ciphers(out_path: &Path) -> PathBuf {
@@ -467,7 +475,7 @@ fn build_multiple_ciphers(out_path: &Path) -> PathBuf {
467475
let mut config = cmake::Config::new(&bundled_dir);
468476

469477
config
470-
.define("CMAKE_BUILD_TYPE", "Release")
478+
.build_target("sqlite3mc_static")
471479
.define("SQLITE3MC_STATIC", "ON")
472480
.define("CODEC_TYPE", "AES256")
473481
.define("SQLITE3MC_BUILD_SHELL", "OFF")

0 commit comments

Comments
 (0)