diff --git a/ferretro_base/Cargo.toml b/ferretro_base/Cargo.toml index 0b6c7e3..34d78a0 100644 --- a/ferretro_base/Cargo.toml +++ b/ferretro_base/Cargo.toml @@ -11,12 +11,23 @@ cc = "^1" libretro-sys = "0.1" libloading = "0.5" num_enum = "0.4" -crossbeam-channel = { version = "0.4", optional = true } -[dev-dependencies] +# examples (both) +structopt = { version = "0.3", optional = true } # example: sdl2_emulator -sdl2 = "0.32" -crossbeam-channel = "0.4" -structopt = "0.3" +sdl2 = { version = "0.32", optional = true } +crossbeam-channel = { version = "0.4", optional = true } # example: ffmpeg_recorder -ffmpeg-next = "4.3.8" +ffmpeg-next = { version = "4.3.8", optional = true } + +[features] +example_sdl2 = ["sdl2", "crossbeam-channel", "structopt"] +example_ffmpeg = ["ffmpeg-next", "structopt"] + +[[example]] +name = "sdl2_emulator" +required-features = ["example_sdl2"] + +[[example]] +name = "ffmpeg_recorder" +required-features = ["example_ffmpeg"] diff --git a/ferretro_components/Cargo.toml b/ferretro_components/Cargo.toml index a848122..3013b70 100644 --- a/ferretro_components/Cargo.toml +++ b/ferretro_components/Cargo.toml @@ -23,3 +23,7 @@ structopt = "0.3" [features] ffmpeg_comp = ["ffmpeg-next"] sdl2_comp = ["sdl2", "gl", "crossbeam-channel"] + +[[example]] +name = "multifunction_emulator" +required-features = ["sdl2_comp", "ffmpeg_comp"]