tplay 0.9.2

A media player that visualizes images and videos as ASCII art directly in the terminal (with sound).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::env;

fn main() {
    let user_mpv = env::var("CARGO_FEATURE_MPV").is_ok();
    let user_rodio_audio = env::var("CARGO_FEATURE_RODIO_AUDIO").is_ok();

    if user_mpv && user_rodio_audio {
        eprintln!("Error: At most one of the following features can be enabled at a time: mpv, rodio_audio.");
        std::process::exit(1);
    }

    if user_mpv {
        println!("cargo:rustc-cfg=feature=\"mpv\"");
    } else if user_rodio_audio {
        println!("cargo:rustc-cfg=feature=\"rodio_audio\"");
    }
}