Skip to content

Commit e6331ef

Browse files
committed
Integrate upstream changes
2 parents b0cbe9c + d26efab commit e6331ef

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "prost-build/third-party/protobuf"]
2-
path = prost-build/third-party/protobuf
3-
url = [email protected]:protocolbuffers/protobuf

prost-build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ regex = { version = "1.5.5", default-features = false, features = ["std", "unico
3232
[build-dependencies]
3333
which = { version = "4", default-features = false }
3434
cfg-if = "1"
35-
cmake = "0.1"
35+
protobuf-src = "1.0.5"
3636

3737
[dev-dependencies]
3838
env_logger = { version = "0.8", default-features = false }

prost-build/build.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ use std::env;
2121
use std::path::PathBuf;
2222
use which::which;
2323

24-
/// Returns the path to the location of the bundled Protobuf artifacts.
25-
fn bundle_path() -> PathBuf {
26-
env::current_dir().unwrap().join("third-party")
27-
}
28-
2924
/// Returns the path to the Protobuf include directory pointed to by the `PROTOC_INCLUDE`
3025
/// environment variable, if it is set.
3126
fn env_protoc_include() -> Option<PathBuf> {
@@ -52,7 +47,7 @@ fn env_protoc_include() -> Option<PathBuf> {
5247

5348
/// Returns the path to the bundled Protobuf include directory.
5449
fn bundled_protoc_include() -> PathBuf {
55-
bundle_path().join("include")
50+
protobuf_src::include()
5651
}
5752

5853
/// Check for `protoc` via the `PROTOC` env var or in the `PATH`.
@@ -73,15 +68,9 @@ fn vendored() -> bool {
7368
}
7469
}
7570

76-
/// Compile `protoc` via `cmake`.
71+
/// Compile `protoc`.
7772
fn compile() -> Option<PathBuf> {
78-
let protobuf_src = bundle_path().join("protobuf").join("cmake");
79-
80-
println!("cargo:rerun-if-changed={}", protobuf_src.display());
81-
82-
let dst = cmake::Config::new(protobuf_src).build();
83-
84-
Some(dst.join("bin").join("protoc"))
73+
Some(protobuf_src::protoc())
8574
}
8675

8776
/// Try to find a `protoc` through a few methods.

prost-build/third-party/protobuf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)