forked from zephyrproject-rtos/nanopb
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
63 lines (59 loc) · 1.37 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
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "nanopb",
products: [
.library(
name: "nanopb",
targets: ["nanopb"]
)
],
targets: [
.target(
name: "nanopb",
path: ".",
sources: [
"pb.h",
"pb_common.h",
"pb_common.c",
"pb_decode.h",
"pb_decode.c",
"pb_encode.h",
"pb_encode.c"
],
publicHeadersPath: "spm_headers",
cSettings: [
.define("PB_FIELD_32BIT", to: "1"),
.define("PB_NO_PACKED_STRUCTS", to: "1"),
.define("PB_ENABLE_MALLOC", to: "1"),
]
),
.testTarget(
name: "swift-test",
dependencies: [
"nanopb",
],
path: "spm-test/swift",
cSettings: [
.headerSearchPath("../"),
.define("PB_FIELD_32BIT", to: "1"),
.define("PB_NO_PACKED_STRUCTS", to: "1"),
.define("PB_ENABLE_MALLOC", to: "1"),
]
),
.testTarget(
name: "objc-test",
dependencies: [
"nanopb",
],
path: "spm-test/objc",
cSettings: [
.headerSearchPath("../"),
.define("PB_FIELD_32BIT", to: "1"),
.define("PB_NO_PACKED_STRUCTS", to: "1"),
.define("PB_ENABLE_MALLOC", to: "1"),
]
)
]
)