Added flac and mp3 output format.
This commit is contained in:
parent
d0a20cd562
commit
d1dca0f477
10 changed files with 745 additions and 128 deletions
25
build.rs
Normal file
25
build.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* 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");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue