|
| 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 | + .revision("05d8107f2971a37e6c77245b7c4c6b0a7e97bc99") |
| 27 | + ), |
| 28 | + .package(name: "BoringSSL-GRPC", |
| 29 | + url: "https://github.com/firebase/boringssl-SwiftPM.git", |
| 30 | + .branch("7bcafa2660bc58715c39637494550d1ed7cd7229") |
| 31 | + ), |
| 32 | + ], |
| 33 | + |
| 34 | + targets: [ |
| 35 | + .target( |
| 36 | + name: "gRPC-Core", |
| 37 | + dependencies: [ |
| 38 | + .product(name:"abseil", package: "abseil"), |
| 39 | + .product(name:"openssl_grpc", package: "BoringSSL-GRPC"), |
| 40 | + ], |
| 41 | + path: ".", |
| 42 | + exclude: [ |
| 43 | + "src/core/ext/filters/load_reporting/", |
| 44 | + "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc", |
| 45 | + "src/core/ext/filters/client_channel/xds/xds_channel.cc", |
| 46 | + "src/core/ext/transport/cronet/", |
| 47 | + "src/core/ext/upb-generated/third_party/", |
| 48 | + "src/core/ext/upbdefs-generated/envoy/config/rbac/", |
| 49 | + "src/core/ext/upbdefs-generated/google/api/expr/", |
| 50 | + "src/core/ext/upbdefs-generated/src/", |
| 51 | + "src/core/ext/upbdefs-generated/third_party/", |
| 52 | + "src/core/ext/upbdefs-generated/udpa/data/", |
| 53 | + "src/core/lib/surface/init_unsecure.cc", |
| 54 | + "src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h", |
| 55 | + "src/core/lib/security/authorization/mock_cel/cel_expression.h", |
| 56 | + "src/core/lib/security/authorization/mock_cel/evaluator_core.h", |
| 57 | + "src/core/lib/security/authorization/mock_cel/flat_expr_builder.h", |
| 58 | + "src/core/lib/security/authorization/mock_cel/statusor.h", |
| 59 | + "src/core/plugin_registry/grpc_unsecure_plugin_registry.cc", |
| 60 | + "third_party/re2/re2/testing/", |
| 61 | + "third_party/re2/re2/fuzzing/", |
| 62 | + "third_party/re2/util/benchmark.cc", |
| 63 | + "third_party/re2/util/test.cc", |
| 64 | + "third_party/re2/util/fuzz.cc", |
| 65 | + "third_party/upb/upb/bindings/", |
| 66 | + "third_party/upb/upb/json/", |
| 67 | + "third_party/upb/upb/pb/", |
| 68 | + ], |
| 69 | + sources: [ |
| 70 | + "src/core/ext/filters/", |
| 71 | + "src/core/ext/transport/", |
| 72 | + "src/core/ext/upb-generated/", |
| 73 | + "src/core/ext/upbdefs-generated/", |
| 74 | + "src/core/ext/xds/", |
| 75 | + "src/core/lib/", |
| 76 | + "src/core/plugin_registry/grpc_plugin_registry.cc", |
| 77 | + "src/core/tsi/", |
| 78 | + "third_party/re2/re2/", |
| 79 | + "third_party/re2/util/", |
| 80 | + "third_party/upb/upb/", |
| 81 | + ], |
| 82 | + publicHeadersPath: "spm-core-include", |
| 83 | + cSettings: [ |
| 84 | + .headerSearchPath("./"), |
| 85 | + .headerSearchPath("include/"), |
| 86 | + .headerSearchPath("third_party/re2/"), |
| 87 | + .headerSearchPath("third_party/upb/"), |
| 88 | + .headerSearchPath("src/core/ext/upb-generated/"), |
| 89 | + .headerSearchPath("src/core/ext/upbdefs-generated/"), |
| 90 | + .define("GRPC_ARES", to: "0"), |
| 91 | + .unsafeFlags(["-Wno-module-import-in-extern-c"]), |
| 92 | + ] |
| 93 | + ), |
| 94 | + .target( |
| 95 | + name: "gRPC-cpp", |
| 96 | + dependencies: [ |
| 97 | + .product(name:"abseil", package: "abseil"), |
| 98 | + "gRPC-Core", |
| 99 | + ], |
| 100 | + path: ".", |
| 101 | + exclude: [ |
| 102 | + "src/cpp/client/cronet_credentials.cc", |
| 103 | + "src/cpp/common/insecure_create_auth_context.cc", |
| 104 | + "src/cpp/ext/", |
| 105 | + "src/cpp/server/channelz/", |
| 106 | + "src/cpp/server/load_reporter/", |
| 107 | + "src/cpp/util/core_stats.cc", |
| 108 | + "src/cpp/util/core_stats.h", |
| 109 | + "src/cpp/util/error_details.cc", |
| 110 | + ], |
| 111 | + sources: [ |
| 112 | + "src/cpp/", |
| 113 | + ], |
| 114 | + publicHeadersPath: "spm-cpp-include", |
| 115 | + cSettings: [ |
| 116 | + .headerSearchPath("./"), |
| 117 | + .headerSearchPath("include/"), |
| 118 | + .headerSearchPath("third_party/upb/"), |
| 119 | + .headerSearchPath("src/core/ext/upb-generated"), |
| 120 | + .unsafeFlags(["-Wno-module-import-in-extern-c"]), |
| 121 | + ] |
| 122 | + ), |
| 123 | + ], |
| 124 | + cLanguageStandard: .gnu11, |
| 125 | + cxxLanguageStandard: .cxx11 |
| 126 | +) |
0 commit comments