From 53e813c48bce9ad021fa059e6b8c8f9acb8c2dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Tue, 19 Apr 2022 19:53:51 +0200 Subject: [PATCH 1/2] gate the build with target_os = "macos" so that we don't get build errors on linux --- core-graphics-types/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core-graphics-types/src/lib.rs b/core-graphics-types/src/lib.rs index f34bf0120..ad88b30fc 100644 --- a/core-graphics-types/src/lib.rs +++ b/core-graphics-types/src/lib.rs @@ -10,5 +10,7 @@ extern crate libc; extern crate core_foundation; +#[cfg(target_os = "macos")] pub mod base; +#[cfg(target_os = "macos")] pub mod geometry; From b06497c735a77d8d367b341cdef7cbf1506d0982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Sat, 23 Apr 2022 10:55:41 +0200 Subject: [PATCH 2/2] allow compilation on any of macos, ios, tvos or watchos --- core-graphics-types/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-graphics-types/src/lib.rs b/core-graphics-types/src/lib.rs index ad88b30fc..cc8fe3115 100644 --- a/core-graphics-types/src/lib.rs +++ b/core-graphics-types/src/lib.rs @@ -7,10 +7,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos"))] + extern crate libc; extern crate core_foundation; -#[cfg(target_os = "macos")] pub mod base; -#[cfg(target_os = "macos")] pub mod geometry;