forked from tobyspark/MathExpressionEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
51 lines (50 loc) · 2.03 KB
/
Copy pathPackage.swift
File metadata and controls
51 lines (50 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// swift-tools-version: 6.0
import PackageDescription
// Standalone engine for the Fabric Math Expression node: the MathExpressionEngine
// target has no package dependencies and no Fabric / Metal / Satin, so a host that
// evaluates expressions links nothing else, and the correctness suite runs with no
// GPU or app. Transforms/quaternions use Apple `simd` at the port boundary, so it
// targets Apple platforms.
//
// MathExpressionEditorSupport is a second product, for a host that edits expressions
// rather than only evaluating them. It is what pulls in CodeEditorView: a host that
// does not link it does not build it, though running this package's own tests does.
// The platform floor below is CodeEditorView's, and SwiftPM declares platforms per
// package rather than per target, so the engine target carries it too.
let package = Package(
name: "MathExpressionEngine",
platforms: [
.macOS(.v14),
.iOS(.v17),
.visionOS(.v1),
],
products: [
.library(name: "MathExpressionEngine", targets: ["MathExpressionEngine"]),
.library(name: "MathExpressionEditorSupport", targets: ["MathExpressionEditorSupport"]),
],
dependencies: [
.package(url: "https://github.com/bradhowes/swift-math-parser", exact: "3.7.3"),
.package(url: "https://github.com/mchakravarty/CodeEditorView.git", from: "0.7.0"),
],
targets: [
.target(name: "MathExpressionEngine"),
.target(
name: "MathExpressionEditorSupport",
dependencies: [
"MathExpressionEngine",
.product(name: "LanguageSupport", package: "CodeEditorView"),
]
),
.testTarget(
name: "MathExpressionEngineTests",
dependencies: [
"MathExpressionEngine",
.product(name: "MathParser", package: "swift-math-parser"),
]
),
.testTarget(
name: "MathExpressionEditorSupportTests",
dependencies: ["MathExpressionEditorSupport"]
),
]
)