From 64be0d569c04ab49531cce99cb524e3e59f97521 Mon Sep 17 00:00:00 2001 From: Jonas Salling Date: Thu, 8 Oct 2020 16:09:53 +0200 Subject: [PATCH] fixin things! --- Package.swift | 9 +++++++-- yoga/YGMacros.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index dbeb5cad..7ae9ea43 100644 --- a/Package.swift +++ b/Package.swift @@ -11,6 +11,7 @@ let package = Package( products: [ .library( name: "yoga", + type: .dynamic, targets: ["yoga"] ), ], @@ -30,8 +31,12 @@ let package = Package( // "-std=c++1y", // "-fPIC", // ]) - ] + ], + linkerSettings: [ + .linkedFramework("Foundation"), + .linkedFramework("UIKit", .when(platforms: [.iOS])), + ] ) ], - cxxLanguageStandard: .cxx11 + cxxLanguageStandard: .cxx14 ) diff --git a/yoga/YGMacros.h b/yoga/YGMacros.h index c6917f1b..51d41e2b 100644 --- a/yoga/YGMacros.h +++ b/yoga/YGMacros.h @@ -7,6 +7,16 @@ #pragma once + +#ifdef __OBJC__ +#import +#endif + + + + + + #ifdef __cplusplus #define YG_EXTERN_C_BEGIN extern "C" { #define YG_EXTERN_C_END }