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:
Leo Kettmeir
2023-10-10 16:46:20 +02:00
committed by GitHub
parent fbde5035c3
commit c4f4ad20b6
33 changed files with 78 additions and 41 deletions
+8 -3
View File
@@ -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
View File
@@ -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;
+1 -1
View File
@@ -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;