Skip to content

Commit 6855914

Browse files
authored
target_os for test (#15)
1 parent 88e9b66 commit 6855914

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

phper-test/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ fn get_lib_path(exe_path: impl AsRef<Path>) -> PathBuf {
171171
let mut ext_name = OsString::new();
172172
ext_name.push("lib");
173173
ext_name.push(exe_stem.replace('-', "_"));
174+
#[cfg(target_os = "linux")]
174175
ext_name.push(".so");
176+
#[cfg(target_os = "macos")]
177+
ext_name.push(".dylib");
178+
#[cfg(target_os = "windows")]
179+
ext_name.push(".dll");
175180

176181
target_dir.join(ext_name)
177182
}

0 commit comments

Comments
 (0)