Skip to content

Commit e3817b1

Browse files
committed
webrtc-sys: always use gio headers from system
There's no point to using the Debian sysroot livekit#730 (comment)
1 parent 18c058c commit e3817b1

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

webrtc-sys/build.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,7 @@ fn main() {
170170
] {
171171
let lib = pkg_config::probe_library(lib_name).unwrap();
172172
if lib_name == "gio-2.0" {
173-
if std::env::var("LK_CUSTOM_WEBRTC").is_ok() {
174-
builder.includes(lib.include_paths);
175-
} else {
176-
add_gio_headers(&mut builder);
177-
}
173+
builder.includes(lib.include_paths);
178174
}
179175
}
180176

@@ -373,29 +369,3 @@ fn configure_android_sysroot(builder: &mut cc::Build) {
373369

374370
builder.flag(format!("-isysroot{}", sysroot.display()).as_str());
375371
}
376-
377-
fn add_gio_headers(builder: &mut cc::Build) {
378-
let webrtc_dir = webrtc_sys_build::webrtc_dir();
379-
let target_arch = webrtc_sys_build::target_arch();
380-
let target_arch_sysroot = match target_arch.as_str() {
381-
"arm64" => "arm64",
382-
"x64" => "amd64",
383-
_ => panic!("unsupported arch"),
384-
};
385-
let sysroot_path = format!("include/build/linux/debian_bullseye_{target_arch_sysroot}-sysroot");
386-
let sysroot = webrtc_dir.join(sysroot_path);
387-
let glib_path = sysroot.join("usr/include/glib-2.0");
388-
println!("cargo:info=add_gio_headers {}", glib_path.display());
389-
390-
builder.include(&glib_path);
391-
let arch_specific_path = match target_arch.as_str() {
392-
"x64" => "x86_64-linux-gnu",
393-
"arm64" => "aarch64-linux-gnu",
394-
_ => panic!("unsupported target"),
395-
};
396-
397-
let glib_path_config = sysroot.join("usr/lib");
398-
let glib_path_config = glib_path_config.join(arch_specific_path);
399-
let glib_path_config = glib_path_config.join("glib-2.0/include");
400-
builder.include(&glib_path_config);
401-
}

0 commit comments

Comments
 (0)