Skip to content

Instantly share code, notes, and snippets.

@geor-kasapidi
Created September 19, 2020 17:03
Show Gist options
  • Select an option

  • Save geor-kasapidi/b119ee811ad31284f77bf13d8f4bf562 to your computer and use it in GitHub Desktop.

Select an option

Save geor-kasapidi/b119ee811ad31284f77bf13d8f4bf562 to your computer and use it in GitHub Desktop.
Yoga 1.18 SPM
// umbrella.h
#pragma once
@import Foundation;
#include "../yoga/Yoga.h"
#include "../yoga/YGMacros.h"
#include "../yoga/YGValue.h"
#include "../yoga/YGEnums.h"
// package.swift
import PackageDescription
let package = Package(
name: "FBY",
platforms: [
.macOS(.v10_13),
.iOS(.v11),
.tvOS(.v11),
.watchOS(.v4),
],
products: [
.library(
name: "FBY",
type: .static,
targets: ["SwiftYoga"]
),
],
targets: [
.target(
name: "SwiftYoga",
dependencies: ["CPPYoga"],
path: "./Sources",
sources: ["Yoga.swift"]
),
.target(
name: "CPPYoga",
dependencies: [],
path: "./Sources",
sources: [
"yoga",
"yoga/event",
"yoga/internal"
],
publicHeadersPath: "headers",
cSettings: [.headerSearchPath("./")]
),
],
cLanguageStandard: .gnu11,
cxxLanguageStandard: .gnucxx14
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment