Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bindings/rust/sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,20 @@ fn build_with_cmake() {
config.define("UNICORN_LOGGING", "ON");
}

// need to clear build target and append "build" to the path because
// unicorn's CMakeLists.txt doesn't properly support 'install', so we use
// the build artifacts from the build directory, which cmake crate sets
// to "<out_dir>/build/"
let dst = config
.define("UNICORN_BUILD_TESTS", "OFF")
.define("UNICORN_INSTALL", "OFF")
.define("UNICORN_INSTALL", "ON")
.define("UNICORN_ARCH", archs)
.no_build_target(true)
.build();

println!(
"cargo:rustc-link-search=native={}",
dst.join("build").display()
dst.join("lib").display()
);
// rhel
println!(
"cargo:rustc-link-search=native={}",
dst.join("lib64").display()
);

// Lazymio(@wtdcode): Dynamic link may break. See: https://github.com/rust-lang/cargo/issues/5077
Expand Down
Loading