-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
110 lines (109 loc) · 3.98 KB
/
Copy pathPackage.swift
File metadata and controls
110 lines (109 loc) · 3.98 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
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
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "iOSOpenVPNAdapter",
platforms: [
.iOS(.v14),
.tvOS(.v14)
],
products: [
.library(
name: "OpenVPNAdapter",
targets: ["OpenVPNAdapter"]
),
],
dependencies: [],
targets: [
.target(
name: "OpenVPNCore",
dependencies: [],
path: "Sources/OpenVPNCore",
exclude: [
"OpenVPN3/test",
"OpenVPN3/javacli",
"OpenVPN3/deps",
"OpenVPN3/scripts",
"OpenVPN3/doc",
"OpenVPN3/openvpn/ovpnagent",
"OpenVPN3/openvpn/omi",
"mbedTLS/tests",
"mbedTLS/programs",
"mbedTLS/docs",
"mbedTLS/scripts",
"mbedTLS/doxygen",
"mbedTLS/visualc",
"mbedTLS/.github",
"mbedTLS/library/Makefile",
"mbedTLS/library/CMakeLists.txt",
"LZ4/tests",
"LZ4/programs",
"LZ4/examples",
"LZ4/doc",
"LZ4/.circleci"
],
sources: [
"OpenVPN3/client/ovpncli.cpp",
"OpenVPN3/openvpn/crypto/data_epoch.cpp",
"mbedTLS/library",
"LZ4/lib/lz4.c",
"LZ4/lib/lz4hc.c"
],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("mbedTLS/include"),
.headerSearchPath("LZ4/lib"),
.define("MBEDTLS_CONFIG_FILE", to: "\"mbedtls_openvpn_config.h\"")
],
cxxSettings: [
.headerSearchPath("OpenVPN3"),
.headerSearchPath("mbedTLS/include"),
.headerSearchPath("ASIO/asio/include"),
.headerSearchPath("LZ4/lib"),
.define("USE_MBEDTLS"),
.define("USE_ASIO"),
.define("USE_ASIO_THREADLOCAL"),
.define("ASIO_STANDALONE"),
.define("ASIO_NO_DEPRECATED"),
.define("ASIO_HAS_STD_STRING_VIEW"),
.define("ENABLE_OVPNDCO", .when(platforms: [.linux])),
.define("OPENVPN_PLATFORM_IPHONE", .when(platforms: [.iOS, .tvOS])),
.define("TARGET_OS_TV", .when(platforms: [.tvOS])),
.define("MBEDTLS_CONFIG_FILE", to: "\"mbedtls_openvpn_config.h\"")
],
linkerSettings: [
.linkedFramework("Security"),
.linkedFramework("SystemConfiguration"),
.linkedFramework("CoreFoundation"),
.linkedFramework("NetworkExtension", .when(platforms: [.iOS, .tvOS]))
]
),
.target(
name: "OpenVPNAdapter",
dependencies: ["OpenVPNCore"],
path: "Sources/OpenVPNAdapter",
sources: ["Core"],
publicHeadersPath: "include",
cxxSettings: [
.headerSearchPath("../OpenVPNCore/OpenVPN3"),
.headerSearchPath("../OpenVPNCore/mbedTLS/include"),
.headerSearchPath("../OpenVPNCore/ASIO/asio/include"),
.headerSearchPath("../OpenVPNCore/LZ4/lib"),
.define("USE_MBEDTLS"),
.define("USE_ASIO"),
.define("USE_ASIO_THREADLOCAL"),
.define("ASIO_STANDALONE"),
.define("ASIO_NO_DEPRECATED"),
.define("ASIO_HAS_STD_STRING_VIEW"),
.define("OPENVPN_PLATFORM_IPHONE", .when(platforms: [.iOS, .tvOS])),
.define("MBEDTLS_CONFIG_FILE", to: "\"mbedtls_openvpn_config.h\"")
]
),
.testTarget(
name: "OpenVPNAdapterTests",
dependencies: ["OpenVPNAdapter"],
path: "Tests/OpenVPNAdapterTests",
sources: ["."]
),
],
cxxLanguageStandard: .gnucxx17
)