Don't generate gstreamer data when dummy media backend enabled. (#35056)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-01-18 09:14:45 -05:00 committed by GitHub
parent 90cbb8abdb
commit efd126f27d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@ use std::process::Command;
use std::{env, fs}; use std::{env, fs};
fn main() { fn main() {
if cfg!(feature = "media-gstreamer") {
println!("cargo:rerun-if-changed=../../python/servo/gstreamer.py"); println!("cargo:rerun-if-changed=../../python/servo/gstreamer.py");
let output = Command::new(find_python()) let output = Command::new(find_python())
@ -21,6 +22,7 @@ fn main() {
} }
let path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("gstreamer_plugins.rs"); let path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("gstreamer_plugins.rs");
fs::write(path, output.stdout).unwrap(); fs::write(path, output.stdout).unwrap();
}
} }
/// Tries to find a suitable python /// Tries to find a suitable python