-
Notifications
You must be signed in to change notification settings - Fork 3
/
Package.swift
93 lines (91 loc) · 2.44 KB
/
Package.swift
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "LuaSwift",
platforms: [
.iOS(.v13),
.macOS(.v10_15)
],
products: [
.library(
name: "Lua",
targets: [
"CLua",
"Lua",
]),
.plugin(
name: "EmbedLuaPlugin",
targets: [
"EmbedLuaPlugin"
]
),
],
dependencies: [
// .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
],
targets: [
.target(
name: "Lua",
dependencies: [
"CLua",
],
resources: [],
swiftSettings: [
// .define("LUASWIFT_NO_FOUNDATION")
.define("LUASWIFT_ANYHASHABLE_BROKEN", .when(platforms: [.linux]))
]
),
.target(
name: "CLua",
dependencies: [],
exclude: [
"lua/all",
"lua/ltests.c",
"lua/lua.c",
"lua/makefile",
"lua/manual",
"lua/onelua.c",
"lua/README.md",
"lua/testes",
],
sources: [
"lua",
"extensions.c",
"loadfile.c",
],
publicHeadersPath: "include",
cSettings: [
.define("LUA_USE_MACOSX", .when(platforms: [.macOS])),
.define("LUA_USE_LINUX", .when(platforms: [.linux])),
.define("LUA_USE_IOS", .when(platforms: [.iOS, .macCatalyst])),
.headerSearchPath("lua"),
]
),
.executableTarget(
name: "embedlua",
dependencies: [
"Lua",
]
),
.plugin(
name: "EmbedLuaPlugin",
capability: .buildTool(),
dependencies: [
"embedlua",
]),
.testTarget(
name: "lua-test",
dependencies: ["Lua", "CLua"],
resources: [
.copy("testRequireRoot1")
],
swiftSettings: [
// .define("LUASWIFT_NO_FOUNDATION")
.define("LUASWIFT_ANYHASHABLE_BROKEN", .when(platforms: [.linux]))
],
plugins: [
.plugin(name: "EmbedLuaPlugin")
]
),
]
)