-
Notifications
You must be signed in to change notification settings - Fork 9
/
Package.swift
116 lines (103 loc) · 4.22 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Mecab-Swift",
defaultLocalization: "en",
platforms: [.macOS(.v10_11)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Mecab-Swift",
targets: ["Mecab-Swift"]),
.library(
name: "IPADic",
targets: ["IPADic"]),
.library(
name: "CharacterFilter",
targets: ["CharacterFilter"]),
.library(
name: "StringTools",
targets: ["StringTools"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(name: "Dictionary"),
.target(
name: "Mecab-Swift",
dependencies: ["mecab", "StringTools", "Dictionary"]),
.target(name: "CharacterFilter"),
.target(name: "StringTools"),
.target(name: "IPADic", dependencies: ["Dictionary"], resources: [.copy("ipadic dictionary")]),
.testTarget(
name: "Mecab-SwiftTests",
dependencies: ["Mecab-Swift", "CharacterFilter", "IPADic"]),
.testTarget(
name: "StringToolsTests",
dependencies: ["StringTools"]),
.target(name: "mecab", dependencies: [],
path: "Sources/mecab/mecab",
exclude: ["src/mecab-cost-train.cpp",
"src/mecab-dict-gen.cpp",
"src/mecab-dict-index.cpp",
"src/mecab-system-eval.cpp",
"src/mecab-test-gen.cpp",
"src/mecab.cpp",
"src/make.bat",
"src/Makefile.am",
"src/Makefile.in",
"src/Makefile.msvc.in",
"csharp",
"doc",
"example",
"java",
"man",
"misc",
"perl",
"python",
"ruby",
"swig",
"tests",
"aclocal.m4",
"AUTHORS",
"autogen.sh",
"ChangeLog",
"config.guess",
"config.h.in",
"config.rpath",
"config.sub",
"configure",
"configure.in",
"GPL",
"INSTALL",
"LGPL",
"install-sh",
"libtool",
"ltmain.sh",
"Makefile.am",
"Makefile.in",
"Makefile.train",
"mecab-config.in",
"mecab.iss.in",
"mecabrc.in",
"missing",
"mkinstalldirs",
"NEWS",
"README",
"stamp-h.in",
],
sources: ["src"],
resources: [.copy("BSD"), .copy("COPYING")],
publicHeadersPath: "swift",
cSettings: [.define("HAVE_CONFIG_H"),
.headerSearchPath(".")],
cxxSettings: [.define("HAVE_ICONV")],
swiftSettings: nil,
linkerSettings: [.linkedLibrary("iconv")]),
]
)