Debian Codegraph @

Package.swift

raw
1 // swift-tools-version:5.2
2 // The swift-tools-version declares the minimum version of Swift required to build this package.
3 import PackageDescription
4
5 let package = Package(
6 name: "gRPC",
7 products: [
8 .library(
9 name: "gRPC-Core",
10 targets: [
11 "gRPC-Core",
12 ]
13 ),
14 .library(
15 name: "gRPC-cpp",
16 targets: [
17 "gRPC-cpp",
18 ]
19 )
20 ],
21
22 dependencies: [
23 .package(
24 name: "abseil",
25 url: "https://github.com/firebase/abseil-cpp-SwiftPM.git",
26 "0.20220203.0"..<"0.20220204.0"
27 ),
28 .package(
29 name: "BoringSSL-GRPC",
30 url: "https://github.com/firebase/boringssl-SwiftPM.git",
31 "0.9.0"..<"0.10.0"
32 ),
33 ],
34
35 targets: [
36 .target(
37 name: "gRPC-Core",
38 dependencies: [
39 .product(name:"abseil", package: "abseil"),
40 .product(name:"openssl_grpc", package: "BoringSSL-GRPC"),
41 ],
42 path: ".",
43 exclude: [
44 "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc",
45 "src/core/ext/filters/load_reporting/",
46 "src/core/ext/transport/cronet/",
47 "src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h",
48 "src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc",
49 "src/core/lib/surface/init_unsecure.cc",
50 "src/core/lib/security/authorization/authorization_policy_provider_null_vtable.cc",
51 "src/core/plugin_registry/grpc_unsecure_plugin_registry.cc",
52 "third_party/re2/re2/testing/",
53 "third_party/re2/re2/fuzzing/",
54 "third_party/re2/util/benchmark.cc",
55 "third_party/re2/util/test.cc",
56 "third_party/re2/util/fuzz.cc",
57 "third_party/upb/upb/bindings/",
58 "third_party/upb/upb/msg_test.cc",
59 ],
60 sources: [
61 "src/core/ext/filters/",
62 "src/core/ext/transport/",
63 "src/core/ext/upb-generated/",
64 "src/core/ext/upbdefs-generated/",
65 "src/core/ext/xds/",
66 "src/core/lib/",
67 "src/core/plugin_registry/grpc_plugin_registry.cc",
68 "src/core/tsi/",
69 "third_party/re2/re2/",
70 "third_party/re2/util/",
71 "third_party/upb/upb/",
72 "third_party/xxhash/xxhash.h",
73 ],
74 publicHeadersPath: "spm-core-include",
75 cSettings: [
76 .headerSearchPath("./"),
77 .headerSearchPath("include/"),
78 .headerSearchPath("third_party/re2/"),
79 .headerSearchPath("third_party/upb/"),
80 .headerSearchPath("third_party/xxhash/"),
81 .headerSearchPath("src/core/ext/upb-generated/"),
82 .headerSearchPath("src/core/ext/upbdefs-generated/"),
83 .define("GRPC_ARES", to: "0"),
84 ],
85 linkerSettings: [
86 .linkedFramework("CoreFoundation"),
87 .linkedLibrary("z"),
88 ]
89 ),
90 .target(
91 name: "gRPC-cpp",
92 dependencies: [
93 .product(name:"abseil", package: "abseil"),
94 "gRPC-Core",
95 ],
96 path: ".",
97 exclude: [
98 "src/cpp/client/cronet_credentials.cc",
99 "src/cpp/client/channel_test_peer.cc",
100 "src/cpp/common/alts_util.cc",
101 "src/cpp/common/alts_context.cc",
102 "src/cpp/common/insecure_create_auth_context.cc",
103 "src/cpp/server/admin/",
104 "src/cpp/server/channelz/",
105 "src/cpp/server/csds/",
106 "src/cpp/server/load_reporter/",
107 "src/cpp/ext/",
108 "src/cpp/util/core_stats.cc",
109 "src/cpp/util/core_stats.h",
110 "src/cpp/util/error_details.cc",
111 ],
112 sources: [
113 "src/cpp/",
114 ],
115 publicHeadersPath: "spm-cpp-include",
116 cSettings: [
117 .headerSearchPath("./"),
118 .headerSearchPath("include/"),
119 .headerSearchPath("third_party/upb/"),
120 .headerSearchPath("src/core/ext/upb-generated"),
121 ]
122 ),
123 .testTarget(
124 name: "build-test",
125 dependencies: [
126 "gRPC-cpp",
127 ],
128 path: "test/spm_build"
129 ),
130 ],
131 cLanguageStandard: .gnu11,
132 cxxLanguageStandard: .cxx14
133 )