Skip to content

Commit

Permalink
jack-sys: search for jack library with pkg-config (#154)
Browse files Browse the repository at this point in the history
* jack-sys: search for jack library with pkg-config

This fixes linking with PipeWire's JACK headers.
Fixes #142

* jack-sys: add package.links=jack to Cargo.toml
  • Loading branch information
Be-ing authored Dec 13, 2021
1 parent 90ab9bd commit bbabe92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jack-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ authors = ["Patrick Reisert"]
description = "Low-level binding to the JACK audio API."
repository = "https:/RustAudio/rust-jack/tree/main/jack-sys"
license = "MIT OR Apache-2.0"
links = "jack"

[dependencies]
libc = "0.2"
libloading = "0.6"
lazy_static = "1.4"

[build-dependencies]
pkg-config = "0.3"
7 changes: 7 additions & 0 deletions jack-sys/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
// pkg-config is required to find PipeWire's implementation of libjack
// Refer to https:/RustAudio/rust-jack/issues/142 for details.
// Do not unwrap this because linking might still work if pkg-config is
// not installed, for example on Windows.
let _ = pkg_config::probe_library("jack");
}

0 comments on commit bbabe92

Please sign in to comment.