mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Configure targets for lz4, mbedTLS and OpenVPN3
This commit is contained in:
63
Package.swift
Normal file
63
Package.swift
Normal file
@@ -0,0 +1,63 @@
|
||||
// swift-tools-version:5.1
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "OpenVPNAdapter",
|
||||
platforms: [
|
||||
.iOS("9.0"),
|
||||
.macOS("10.11"),
|
||||
],
|
||||
products: [
|
||||
.library(name: "OpenVPNAdapter", type: .static, targets: ["OpenVPNAdapter"]),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "OpenVPNAdapter",
|
||||
dependencies: [
|
||||
.target(name: "OpenVPN3")
|
||||
],
|
||||
cxxSettings: [
|
||||
.headerSearchPath("../OpenVPN3"),
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "LZ4",
|
||||
sources: ["lib"],
|
||||
cSettings: [
|
||||
.define("XXH_NAMESPACE", to: "LZ4_")
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "mbedTLS",
|
||||
sources: ["library"],
|
||||
cSettings: [
|
||||
.define("MBEDTLS_MD4_C"),
|
||||
.define("MBEDTLS_RELAXED_X509_DATE"),
|
||||
.define("_FILE_OFFSET_BITS", to: "64"),
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "OpenVPN3",
|
||||
dependencies: [
|
||||
.target(name: "LZ4"),
|
||||
.target(name: "mbedTLS")
|
||||
],
|
||||
sources: ["library"],
|
||||
cxxSettings: [
|
||||
.headerSearchPath("."),
|
||||
.headerSearchPath("../ASIO/asio/include"),
|
||||
.define("ASIO_STANDALONE"),
|
||||
.define("ASIO_NO_DEPRECATED"),
|
||||
.define("ASIO_HAS_STD_STRING_VIEW"),
|
||||
.define("USE_ASIO"),
|
||||
.define("USE_ASIO_THREADLOCAL"),
|
||||
.define("HAVE_LZ4"),
|
||||
.define("USE_MBEDTLS"),
|
||||
.define("OPENVPN_FORCE_TUN_NULL"),
|
||||
.define("USE_TUN_BUILDER")
|
||||
]
|
||||
)
|
||||
],
|
||||
cxxLanguageStandard: .gnucxx14
|
||||
)
|
||||
Reference in New Issue
Block a user