-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
75 lines (72 loc) · 1.98 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
// swift-tools-version: 5.10
//
// SPDX-License-Identifier: Unicode-3.0
// Copyright Contributors to the ICU project
import PackageDescription
let package = Package(
name: "icu",
platforms: [
.macOS(.v14),
.visionOS(.v1),
.iOS(.v17),
.tvOS(.v17),
.watchOS(.v10)
],
products: [
.library(
name: "icuuc",
targets: ["icuuc"]
),
.library(
name: "icuin",
targets: ["icuin"]
),
.executable(
name: "TestUnicode",
targets: ["TestUnicode"]
),
],
targets: [
.target(
name: "icuuc",
publicHeadersPath: ".",
cxxSettings: [
.define("U_COMMON_IMPLEMENTATION"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
.define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])),
.define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])),
]
),
.target(
name: "icuin",
dependencies: [
.target(name: "icuuc")
],
publicHeadersPath: ".",
cxxSettings: [
.define("U_I18N_IMPLEMENTATION"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
.define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])),
.define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])),
],
linkerSettings: [
.linkedLibrary("advapi32", .when(platforms: [.windows]))
]
),
.executableTarget(
name: "TestUnicode",
dependencies: [
.target(name: "icuin")
],
cxxSettings: [
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
.define("_ALLOW_KEYWORD_MACROS", to: "1", .when(platforms: [.windows])),
.define("static_assert(_conditional, ...)", to: "", .when(platforms: [.windows])),
],
swiftSettings: [
.interoperabilityMode(.Cxx)
]
),
],
cxxLanguageStandard: .cxx17
)