forked from open-meteo/open-meteo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
58 lines (55 loc) · 2.44 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
// swift-tools-version:5.6
import PackageDescription
#if arch(x86_64)
let flagsCTurbo = ["-march=skylake", "-w"]
let flagsHelper = ["-march=skylake"]
#else
let flagsCTurbo = ["-w"]
let flagsHelper = [String]()
#endif
let package = Package(
name: "OpenMeteoApi",
platforms: [
.macOS(.v12)
],
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.13.1"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.67.4"),
.package(url: "https://github.com/vapor/leaf.git", from: "4.0.0"),
.package(url: "https://github.com/patrick-zippenfenig/SwiftNetCDF.git", from: "1.0.0"),
.package(url: "https://github.com/patrick-zippenfenig/SwiftTimeZoneLookup.git", from: "1.0.1"),
.package(url: "https://github.com/patrick-zippenfenig/SwiftEccodes.git", from: "0.1.5"),
.package(url: "https://github.com/orlandos-nl/IkigaJSON.git", from: "2.0.0"),
//.package(name: "SwiftPFor2D", path: "/Users/om/Documents/SwiftPFor2D"),
// NOTE: taged releases do not work, because of unsafe flags....
//.package(url: "[email protected]:open-meteo/SwiftPFor2D.git", .branch("main"))
],
targets: [
.target(
name: "App",
dependencies: [
.product(name: "Vapor", package: "vapor"),
.product(name: "Leaf", package: "leaf"),
.product(name: "SwiftNetCDF", package: "SwiftNetCDF"),
.product(name: "SwiftTimeZoneLookup", package: "SwiftTimeZoneLookup"),
.product(name: "SwiftEccodes", package: "SwiftEccodes"),
"CHelper",
"SwiftPFor2D",
"IkigaJSON",
"CZlib",
"CBz2lib"
],
swiftSettings: [
.unsafeFlags(["-cross-module-optimization", "-Ounchecked"], .when(configuration: .release))
]
),
.systemLibrary(name: "CZlib", pkgConfig: "z", providers: [.brew(["zlib"]), .apt(["libz-dev"])]),
.systemLibrary(name: "CBz2lib", pkgConfig: "bz2", providers: [.brew(["bzip2"]), .apt(["libbz2-dev"])]),
.target(name: "CHelper", cSettings: [.unsafeFlags(flagsHelper)]),
.executableTarget(name: "openmeteo-api", dependencies: [.target(name: "App")]),
.testTarget(name: "AppTests", dependencies: [.target(name: "App")]),
.target(name: "SwiftPFor2D", dependencies: ["CTurboPFor"]),
.target(name: "CTurboPFor", cSettings: [.unsafeFlags(flagsCTurbo)]), // disable all warnings, generated from macros
//.testTarget(name: "SwiftPFor2DTests", dependencies: ["SwiftPFor2D", "CTurboPFor"]),
]
)