feat: add link feature (#608)
adjust docs Update cocoa/Cargo.toml Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> fmt
This commit is contained in:
+8
-3
@@ -15,8 +15,13 @@ default-target = "x86_64-apple-darwin"
|
||||
block = "0.1"
|
||||
bitflags = "1.0"
|
||||
libc = "0.2"
|
||||
cocoa-foundation = { path = "../cocoa-foundation", version = "0.1" }
|
||||
core-foundation = { path = "../core-foundation", version = "0.9" }
|
||||
core-graphics = { path = "../core-graphics", version = "0.23" }
|
||||
cocoa-foundation = { default-features = false, path = "../cocoa-foundation", version = "0.1" }
|
||||
core-foundation = { default-features = false, path = "../core-foundation", version = "0.9" }
|
||||
core-graphics = { default-features = false, path = "../core-graphics", version = "0.23" }
|
||||
foreign-types = "0.5"
|
||||
objc = "0.2.3"
|
||||
|
||||
[features]
|
||||
default = ["link"]
|
||||
# Disable to manually link. Enabled by default.
|
||||
link = ["core-foundation/link", "cocoa-foundation/link", "core-graphics/link"]
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ pub type CGLContextObj = *mut c_void;
|
||||
|
||||
pub type GLint = i32;
|
||||
|
||||
#[link(name = "AppKit", kind = "framework")]
|
||||
#[cfg_attr(feature = "link", link(name = "AppKit", kind = "framework"))]
|
||||
extern "C" {
|
||||
pub static NSAppKitVersionNumber: f64;
|
||||
|
||||
@@ -3836,7 +3836,7 @@ impl NSImage for id {
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "AppKit", kind = "framework")]
|
||||
#[cfg_attr(feature = "link", link(name = "AppKit", kind = "framework"))]
|
||||
extern "C" {
|
||||
// Image hints (NSString* const)
|
||||
pub static NSImageHintCTM: id;
|
||||
|
||||
@@ -1572,7 +1572,7 @@ impl CATransform3D {
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "QuartzCore", kind = "framework")]
|
||||
#[cfg_attr(feature = "link", link(name = "QuartzCore", kind = "framework"))]
|
||||
extern "C" {
|
||||
static kCARendererColorSpace: CFStringRef;
|
||||
static kCARendererMetalCommandQueue: CFStringRef;
|
||||
|
||||
Reference in New Issue
Block a user