Repository navigation
Expand file tree
/
Copy pathmcpp.toml
More file actions
83 lines (66 loc) · 2.84 KB
/
Copy pathmcpp.toml
File metadata and controls
83 lines (66 loc) · 2.84 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Module wrapper; upstream API preserved. Policy: mcpp-index/docs/mwrap.md.
[package]
namespace = "mcpplibs.mwrap"
name = "protobuf"
version = "35.1"
description = "Protocol Buffers 35.1 C++ modules for mcpp (import mcpplibs.mwrap.protobuf;): messages, descriptors, reflection, the well-known types, JSON and text formats, streams, run-time .proto parsing; protoc code generation through the codegen feature"
license = "Apache-2.0"
authors = ["mcpp-community"]
repo = "https://github.com/mcpplibs/protobuf-m"
platforms = ["linux", "macos", "windows", "emscripten"]
[targets.protobuf]
kind = "lib"
[build]
# The modules only: the library is compat.protobuf (over compat.abseil), built
# from the same release. src/protobuf.cppm, io, util, compiler, macros and
# gzip/io_gzip.cppm are written by tools/surface.py.
sources = ["src/*.cppm"]
# <mwrap/protobuf/prelude.hpp> and <mwrap/protobuf/macros.hpp>.
include_dirs = ["include"]
[dependencies]
compat.protobuf = "35.1"
[dev-dependencies]
compat.gtest = "1.15.2"
# tests/abseil_identity_test.cpp: protobuf's absl::Status is mcpplibs.mwrap.abseil's.
mcpplibs.mwrap.abseil = "20250512.1"
# GzipInputStream / GzipOutputStream: compat.protobuf compiles them only with
# its gzip feature (over compat.zlib), so their module exists only here.
[features.gzip]
sources = ["src/gzip/io_gzip.cppm"]
[feature-deps.gzip]
compat.protobuf = { version = "35.1", features = ["gzip"] }
# upb, protobuf's C runtime, from the same tarball: what gRPC links. Forwarded
# so that a program with both resolves one protobuf with the union of features.
[feature-deps.upb]
compat.protobuf = { version = "35.1", features = ["upb"] }
# Code generation: protoc, built by mcpp for the build machine from the same
# release the program links (it needs upb), handed to the consumer with the
# rule package below. Not on Windows: compat.protobuf 35.1 does not build
# protoc there.
[feature-deps.codegen]
compat.protobuf = { version = "35.1", features = ["upb"], tools = ["protoc"], reexport = true }
# The rule, as an importable host module (`import protogen;` in build.mcpp).
[build-dependencies]
mcpplibs.protogen = { path = "rules", host-module = true, reexport = true }
[package.metadata.mwrap]
upstream-version = "35.1"
[[runtime.deploy]]
from = "LICENSE"
to = "licenses/protobuf"
[[runtime.deploy]]
from = "NOTICE"
to = "licenses/protobuf"
[[runtime.deploy]]
from = "upstream/protobuf/README.md"
to = "licenses/protobuf/upstream/protobuf"
[[runtime.deploy]]
from = "upstream/protobuf/LICENSE"
to = "licenses/protobuf/upstream/protobuf"
[[runtime.deploy]]
from = "upstream/utf8_range/LICENSE"
to = "licenses/protobuf/upstream/utf8_range"
[[runtime.deploy]]
from = "upstream/abseil-cpp/LICENSE"
to = "licenses/protobuf/upstream/abseil-cpp"
[target.'cfg(windows)'.build]
cxxflags = ["-DNOMINMAX", "-DWIN32_LEAN_AND_MEAN"]