Build media and live-kit in test-mode on non-MacOS (#6859)
Build media and live-kit in test-mode on non-MacOS (Related to https://github.com/zed-industries/zed/issues/5391 https://github.com/zed-industries/zed/issues/5395 https://github.com/zed-industries/zed/issues/5394) This makes it possible to build the media and live-kit crates on non-MacOS Release Notes: - N/A
This commit is contained in:
parent
e69e6f5586
commit
2c834c24a3
8 changed files with 68 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
use std::{env, path::PathBuf, process::Command};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn main() {
|
||||
use std::{env, path::PathBuf, process::Command};
|
||||
|
||||
let sdk_path = String::from_utf8(
|
||||
Command::new("xcrun")
|
||||
.args(["--sdk", "macosx", "--show-sdk-path"])
|
||||
|
@ -37,3 +38,6 @@ fn main() {
|
|||
.write_to_file(out_path.join("bindings.rs"))
|
||||
.expect("couldn't write dispatch bindings");
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn main() {}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(unused)]
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use objc::*;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
|
||||
mod bindings;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use core_foundation::{
|
||||
base::{CFTypeID, TCFType},
|
||||
declare_TCFType, impl_CFTypeDescription, impl_TCFType,
|
||||
};
|
||||
use std::ffi::c_void;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod io_surface {
|
||||
use super::*;
|
||||
|
||||
|
@ -27,6 +29,7 @@ pub mod io_surface {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod core_video {
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
|
@ -206,6 +209,7 @@ pub mod core_video {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod core_media {
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
|
@ -413,6 +417,7 @@ pub mod core_media {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod video_toolbox {
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue