Skip to content

Commit

Permalink
Always print the PKG_CONFIG_PATH in verbose mode
Browse files Browse the repository at this point in the history
This way is possible to do
```
$ export `cargo cbuild -v 2>&1 | grep PKG_CONFIG_PATH | cut -f 2 -d ' '`
```
To use the pkg-config file in uninstalled mode.
  • Loading branch information
lu-zero committed Sep 2, 2024
1 parent 90fb7c1 commit 0e67a6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ fn copy_prebuilt_include_file(
) -> anyhow::Result<()> {
let mut shell = ws.gctx().shell();
shell.status("Populating", "uninstalled header directory")?;
let path = &format!("PKG_CONFIG_PATH=\"{}\"", root_output.display());
shell.verbose(move |s| s.note(path))?;
for (from, to) in build_targets.extra.include.iter() {
let to = root_output.join("include").join(to);
create_dir_all(to.parent().unwrap())?;
Expand Down Expand Up @@ -1244,6 +1242,11 @@ pub fn cbuild(
// It is not a new build, recover the static_libs value from the cache
cpkg.finger_print.static_libs = cpkg.finger_print.load_previous()?.static_libs;
}

ws.gctx().shell().verbose(|s| {
let path = &format!("PKG_CONFIG_PATH=\"{}\"", root_output.display());
s.note(path)
})?;
}

Ok((members, compile_opts))
Expand Down

0 comments on commit 0e67a6d

Please sign in to comment.