Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ exclude = [

[build-dependencies]
cmake = "0.1.50"
bindgen = "0.69.1"
bindgen = "0.72.1"
16 changes: 14 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,22 @@ fn main() {
let library_root = lib_destination.join("build/libs");
println!("cargo:rustc-link-search={}", library_root.to_string_lossy());

// the target operating system (NOT the same as cfg(target_os)
// since in a build.rs, this will always be the host system.
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();

if !matches!(PD_MULTI, "true") {
println!("cargo:rustc-link-lib=static=pd");
if target_os == "windows" {
println!("cargo:rustc-link-lib=static=libpd-static");
} else {
println!("cargo:rustc-link-lib=static=pd");
}
} else {
println!("cargo:rustc-link-lib=static=pd-multi");
if target_os == "windows" {
println!("cargo:rustc-link-lib=static=libpd-multi-static");
} else {
println!("cargo:rustc-link-lib=static=pd-multi");
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(unnecessary_transmutes)]

//! Rust bindings for [libpd](https://github.com/libpd/libpd).
//!
Expand Down