Skip to content

Commit 68fdeb6

Browse files
authored
Merge pull request #379 from fortanix/raoul/rte-294-specify_install_directory_libraries
[RTE-294] Specify install directory libraries
2 parents d7f958b + 5612d7d commit 68fdeb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mbedtls-sys/build/cmake.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
impl super::BuildConfig {
1010
pub fn cmake(&self) {
11+
static INSTALL_DIR: &str = "lib";
12+
1113
let mut cmk = cmake::Config::new(&self.mbedtls_src);
1214
cmk.cflag(format!(
1315
r#"-DMBEDTLS_CONFIG_FILE="\"{}\"""#,
@@ -19,6 +21,8 @@ impl super::BuildConfig {
1921
.define("GEN_FILES", "ON")
2022
// Prefer unix-style over Apple-style Python3 on macOS, required for the Github Actions CI
2123
.define("Python3_FIND_FRAMEWORK", "LAST")
24+
// Ensure same installation directory is used on all platforms
25+
.define("LIB_INSTALL_DIR", INSTALL_DIR)
2226
.build_target("install");
2327
for cflag in &self.cflags {
2428
cmk.cflag(cflag);
@@ -50,7 +54,7 @@ impl super::BuildConfig {
5054

5155
println!(
5256
"cargo:rustc-link-search=native={}",
53-
dst.join("lib").to_str().expect("link-search UTF-8 error")
57+
dst.join(INSTALL_DIR).to_str().expect("link-search UTF-8 error")
5458
);
5559

5660
println!("cargo:rustc-link-lib=static=mbedtls");

0 commit comments

Comments
 (0)