Add support for Swift Package Manager #1032

Closed
salling wants to merge 17 commits from swiftpm into main
3 changed files with 53 additions and 2 deletions
Showing only changes of commit f5cc77bffa - Show all commits

View File

@@ -11,7 +11,6 @@ let package = Package(
products: [ products: [
.library( .library(
name: "yoga", name: "yoga",
type: .dynamic,
targets: ["yoga"] targets: ["yoga"]
), ),
], ],
@@ -20,6 +19,7 @@ let package = Package(
name: "yoga", name: "yoga",
dependencies: [], dependencies: [],
path: "./yoga", path: "./yoga",
publicHeadersPath: "./apple-public",
cxxSettings: [ cxxSettings: [
.headerSearchPath("../"), .headerSearchPath("../"),
], ],

View File

@@ -33,7 +33,6 @@ Pod::Spec.new do |spec|
'-fPIC' '-fPIC'
] ]
spec.source_files = 'yoga/**/*.{c,h,cpp}' spec.source_files = 'yoga/**/*.{c,h,cpp}'
spec.exclude_files = 'yoga/include/*.h' spec.public_header_files = 'yoga/apple-public/umbrella.h'
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGNode,YGStyle,YGValue}.h'
end end

View File

@@ -7,16 +7,6 @@
#pragma once #pragma once
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
#define YG_EXTERN_C_BEGIN extern "C" { #define YG_EXTERN_C_BEGIN extern "C" {
#define YG_EXTERN_C_END } #define YG_EXTERN_C_END }

View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#include "../YGEnums.h"
#include "../YGMacros.h"
#include "../YGNode.h"
#include "../YGStyle.h"
#include "../YGValue.h"
#include "../Yoga.h"
#endif

View File

@@ -1 +0,0 @@
../YGEnums.h

View File

@@ -1 +0,0 @@
../YGMacros.h

View File

@@ -1 +0,0 @@
../YGNode.h

View File

@@ -1 +0,0 @@
../YGStyle.h

View File

@@ -1 +0,0 @@
../YGValue.h

View File

@@ -1 +0,0 @@
../Yoga.h