-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
60 lines (58 loc) · 1.74 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
// swift-tools-version: 5.7
import PackageDescription
let package = Package(
name: "swift-pos",
products: [
.library(
name: "POS",
targets: ["POS"]),
],
targets: [
.target(
name: "blake3",
path: "Sources/chiapos/src/b3",
exclude: [
"blake3_avx2_x86-64_unix.S",
"blake3_avx2.c",
"blake3_avx512_x86-64_unix.S",
"blake3_avx512.c",
"blake3_sse41_x86-64_unix.S",
"blake3_sse41.c",
],
publicHeadersPath: "./",
cSettings: [
.define("BLAKE3_NO_AVX2", to: "1"),
.define("BLAKE3_NO_AVX512", to: "1"),
.define("BLAKE3_NO_SSE41", to: "1")
]),
.target(
name: "chiapos",
path: "Sources/chiapos/src",
exclude: [
"b3",
"cli.cpp",
"../lib/FiniteStateEntropy/lib/huf_compress.c"
],
publicHeadersPath: "./",
cxxSettings: [
.headerSearchPath("b3"),
.headerSearchPath("../lib/include")
]),
.target(
name: "ObjCPOS",
dependencies: ["chiapos", "blake3"],
path: "Sources/ObjCPOS",
cxxSettings: [
.headerSearchPath("../chiapos/src"),
.headerSearchPath("../chiapos/src/b3"),
.headerSearchPath("../chiapos/lib/include")
]),
.target(
name: "POS",
dependencies: ["ObjCPOS"]),
.testTarget(
name: "POSTests",
dependencies: ["POS"]),
],
cxxLanguageStandard: .cxx17
)