25 lines
934 B
Rust
25 lines
934 B
Rust
/*
|
|
* Build script for tuxrecord2.
|
|
*
|
|
* The FLAC and MP3 encoders are provided by the system libFLAC and
|
|
* libmp3lame libraries, which are used through the small FFI shims in
|
|
* src/flac.rs and src/mp3.rs. Locate them with pkg-config (which also
|
|
* emits the correct link flags and library search paths) so builds work
|
|
* on distributions where the headers/libraries live in non-standard
|
|
* locations.
|
|
*/
|
|
|
|
fn main() {
|
|
for lib in ["flac", "lame"] {
|
|
pkg_config::Config::new().probe(lib).unwrap_or_else(|err| {
|
|
panic!(
|
|
"could not find the '{lib}' library with pkg-config: {err}\n\
|
|
Install the development package (e.g. 'libflac-dev' and \
|
|
'libmp3lame-dev' on Debian/Ubuntu, 'flac-devel' and \
|
|
'lame-devel' on Fedora, 'flac' and 'lame' on Arch)."
|
|
);
|
|
});
|
|
}
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
}
|