cargo: add features for every library

This commit is contained in:
meh
2023-05-24 21:49:22 +02:00
committed by Till Höppner
parent 1bb0354ce7
commit c82cab4dbe
2 changed files with 23 additions and 2 deletions
+13 -2
View File
@@ -1,7 +1,18 @@
[package]
name = "ffmpeg-sys"
name = "ffmpeg-sys"
version = "2.6.2-1"
authors = ["meh. <meh@schizofreni.co>"]
license = "WTFPL"
description = "FFI bindings to FFmpeg"
repository = "https://github.com/meh/rust-ffmpeg-sys"
repository = "https://github.com/meh/rust-ffmpeg-sys"
[features]
default = ["avcodec", "avdevice", "avformat", "postproc", "swscale"]
avcodec = []
avdevice = ["avformat"]
avformat = ["avcodec"]
postproc = []
swscale = []
+10
View File
@@ -7,17 +7,27 @@ extern crate libc;
mod avutil;
pub use avutil::*;
#[cfg(feature = "avcodec")]
mod avcodec;
#[cfg(feature = "avcodec")]
pub use avcodec::*;
#[cfg(feature = "avdevice")]
mod avdevice;
#[cfg(feature = "avdevice")]
pub use avdevice::*;
#[cfg(feature = "avformat")]
mod avformat;
#[cfg(feature = "avformat")]
pub use avformat::*;
#[cfg(feature = "swscale")]
mod swscale;
#[cfg(feature = "swscale")]
pub use swscale::*;
#[cfg(feature = "postproc")]
mod postproc;
#[cfg(feature = "postproc")]
pub use postproc::*;