Remove src/dummy.m

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-08-30 16:27:33 +02:00
parent 1611635e5f
commit d473b52f5a
3 changed files with 1 additions and 16 deletions

View file

@ -5,7 +5,6 @@ fn main() {
println!("cargo:rustc-link-lib=framework=ScreenCaptureKit");
println!("cargo:rustc-link-lib=framework=System");
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=12.3");
println!("cargo:rustc-link-arg=-ObjC");
let sdk_path = String::from_utf8(
Command::new("xcrun")
@ -36,10 +35,4 @@ fn main() {
bindings
.write_to_file(out_path.join("bindings.rs"))
.expect("couldn't write dispatch bindings");
println!("cargo:rerun-if-changed=src/dummy.m");
cc::Build::new()
.file("src/dummy.m")
.flag("-mmacosx-version-min=12.3")
.compile("dummy");
}

View file

@ -1,7 +0,0 @@
#import <ScreenCaptureKit/ScreenCaptureKit.h>
@interface MyClass : NSObject <SCStreamOutput, SCStreamDelegate>
@end
@implementation MyClass
@end

View file

@ -14,7 +14,7 @@ use objc::{
class,
declare::ClassDecl,
msg_send,
runtime::{Object, Protocol, Sel},
runtime::{Object, Sel},
sel, sel_impl,
};
use simplelog::SimpleLogger;
@ -55,7 +55,6 @@ fn main() {
let display_height: usize = msg_send![display, height];
let mut decl = ClassDecl::new("CaptureOutput", class!(NSObject)).unwrap();
decl.add_protocol(Protocol::get("SCStreamOutput").unwrap());
decl.add_method(sel!(stream:didOutputSampleBuffer:ofType:), sample_output as extern "C" fn(&Object, Sel, id, id, SCStreamOutputType));
let capture_output_class = decl.register();