-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
41 lines (36 loc) · 1.03 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
// swift-tools-version:5.3
/**
* Copyright (c) 2021 Dustin Collins (Strega's Gate)
* All Rights Reserved.
* Licensed under Apache License v2.0
*
* Find me on https://www.YouTube.com/STREGAsGate, or social media @STREGAsGate
*
* This package includes unmodified sourcecode for zlib.
* https://zlib.net/
*
* This package includes unmodified sourcecode for libpng.
* http://www.libpng.org/
*/
import PackageDescription
var cSettings: [CSetting]? {
var settings: [CSetting] = []
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
settings.append(.define("Z_HAVE_UNISTD_H"))
#endif
settings.append(.unsafeFlags(["-Ofast"], .when(configuration: .release)))
return settings
}
let package = Package(
name: "LibPNG",
products: [
.library(name: "LibPNG", targets: ["LibPNG"])
],
targets: [
.target(name: "LibPNG",
path: "./Sources/LibPNG",
publicHeadersPath: "Include",
cSettings: cSettings),
],
cLanguageStandard: .gnu11
)