feature: support swift package manager #965

Closed
song-react wants to merge 2 commits from master into main
4 changed files with 57 additions and 1 deletions
Showing only changes of commit 2a3f4a3817 - Show all commits

3
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.DS_STORE .DS_STORE
/buck-cache/ /buck-cache/
/buck-out/ /buck-out/
/.buckconfig.local /.buckconfig.local
@@ -7,6 +8,8 @@
/gentest/test.html /gentest/test.html
.buckversion .buckversion
.build/
# Jekyll # Jekyll
/.sass-cache/ /.sass-cache/
/_site/ /_site/

38
Package.swift Normal file
View File

@@ -0,0 +1,38 @@
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "YogaKit",
platforms: [
.macOS(.v10_10),
.iOS(.v8),
.tvOS(.v9),
.watchOS(.v2)
],
products: [
.library(
name: "YogaKit",
type: .static,
targets: ["YogaKit"]
)
],
dependencies: [],
targets: [
.target(
name: "YogaKit",
path: "yoga",
exclude: [],
sources: ["./"],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("./")
]
)
],
swiftLanguageVersions: [
.version("5")
],
cLanguageStandard: .gnu11,
cxxLanguageStandard: .gnucxx14
)

View File

@@ -10,7 +10,7 @@
#include <functional> #include <functional>
#include <vector> #include <vector>
#include <array> #include <array>
#include <yoga/YGEnums.h> #include "../YGEnums.h"
struct YGConfig; struct YGConfig;
struct YGNode; struct YGNode;

View File

@@ -0,0 +1,15 @@
/*
* 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
@import Foundation;
#include "../Yoga.h"
#include "../YGMacros.h"
#include "../YGValue.h"
#include "../YGEnums.h"