fixup! fix: make sesam-vitale build works even when having a lib.rs file
This commit is contained in:
parent
a1797d65df
commit
27d73c5209
@ -8,7 +8,7 @@ fn main() {
|
||||
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let manifest_path = PathBuf::from(manifest_dir);
|
||||
dotenv::from_path(manifest_path.join(".env.build")).ok();
|
||||
|
||||
|
||||
println!("cargo::rerun-if-env-changed=SESAM_FSV_LIB_PATH");
|
||||
println!("cargo::rerun-if-env-changed=SESAM_FSV_SSVLIB");
|
||||
println!("cargo::rerun-if-changed=.env.build");
|
||||
@ -32,4 +32,5 @@ fn main() {
|
||||
|
||||
// Link the SESAM_FSV_SSVLIB dynamic library
|
||||
println!("cargo::rustc-link-lib=dylib={}", env::var("SESAM_FSV_SSVLIB").unwrap());
|
||||
// TODO : try `raw-dylib` instead of `dylib` on Windows to avoid the need of the `lib` headers compiled from the `def`
|
||||
}
|
||||
|
@ -6,16 +6,8 @@
|
||||
|
||||
use libc::{ c_char, c_void, c_ushort, size_t };
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[link(name = "ssvlux64")]
|
||||
extern "C" {
|
||||
pub fn SSV_InitLIB2(pcRepSesamIni: *const c_char) -> c_ushort;
|
||||
pub fn SSV_LireCartePS(NomRessourcePS: *const c_char, NomRessourceLecteur: *const c_char, CodePorteurPS: *const c_char, ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
||||
pub fn SSV_LireConfig(ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
#[link(name = "ssvw64")]
|
||||
#[cfg_attr(target_os = "linux", link(name = "ssvlux64"))]
|
||||
#[cfg_attr(target_os = "windows", link(name = "ssvw64"))]
|
||||
extern "C" {
|
||||
pub fn SSV_InitLIB2(pcRepSesamIni: *const c_char) -> c_ushort;
|
||||
pub fn SSV_LireCartePS(NomRessourcePS: *const c_char, NomRessourceLecteur: *const c_char, CodePorteurPS: *const c_char, ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
||||
|
Loading…
Reference in New Issue
Block a user