Skip to content

Commit 052f33e

Browse files
wtdcodeKaddate
authored andcommitted
Enable install for rust bindings (unicorn-engine#2224)
* Enable install for rust bindings * also search for lib64
1 parent 2da916c commit 052f33e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

bindings/rust/sys/build.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,20 @@ fn build_with_cmake() {
125125
config.define("UNICORN_LOGGING", "ON");
126126
}
127127

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

139134
println!(
140135
"cargo:rustc-link-search=native={}",
141-
dst.join("build").display()
136+
dst.join("lib").display()
137+
);
138+
// rhel
139+
println!(
140+
"cargo:rustc-link-search=native={}",
141+
dst.join("lib64").display()
142142
);
143143

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

0 commit comments

Comments
 (0)