Skip to content

Commit

Permalink
use rs-release branch
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
  • Loading branch information
BusyJay committed Aug 1, 2023
1 parent 39f9f80 commit cbf1d43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions grpc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ use cmake::Config as CmakeConfig;
use pkg_config::{Config as PkgConfig, Library};
use walkdir::WalkDir;

const GRPC_VERSION: &str = "1.44.0";
fn grpc_version() -> &'static str {
let mut version = env!("CARGO_PKG_VERSION").split('+');
version.next().unwrap();
let label = version.next().unwrap();
label.split('-').next().unwrap()
}

include!("link-deps.rs");

fn probe_library(library: &str, cargo_metadata: bool) -> Library {
match PkgConfig::new()
.atleast_version(GRPC_VERSION)
.atleast_version(grpc_version())
.cargo_metadata(cargo_metadata)
.probe(library)
{
Expand Down Expand Up @@ -97,7 +102,7 @@ fn list_packages(dst: &Path) {
.print_system_libs(false)
.env_metadata(false)
.cargo_metadata(false)
.atleast_version(GRPC_VERSION);
.atleast_version(grpc_version());
let grpc = cfg.probe("grpc").unwrap();
let mut grpc_libs: HashSet<_> = grpc.libs.iter().cloned().collect();
let grpc_unsecure = cfg.probe("grpc_unsecure").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion grpc-sys/grpc
Submodule grpc updated from 4f6355 to 815f12

0 comments on commit cbf1d43

Please sign in to comment.